17 #ifndef AWALI_ALGOS_ARE_EQUIVALENT_HH
18 # define AWALI_ALGOS_ARE_EQUIVALENT_HH
43 template <
typename Aut1,
typename Aut2,
typename P>
47 && std::is_same<weightset_t_of<Aut1>,
b>
::value
49 && std::is_same<weightset_t_of<Aut2>,
b>
::value),
58 template <
typename Aut1,
typename Aut2,
typename T>
61 -> decltype(aut2->weightset()->sub,
62 aut2->weightset()->zero,
63 aut2->weightset()->one,
66 const auto& ws2 = *aut2->weightset();
68 auto d = sum(aut1,
left_mult(aut2, ws2.sub(ws2.zero(), ws2.one())));
73 template <
typename Aut1,
typename Aut2,
typename P>
77 raise(
"Function are_equivalent is only supported for weightsets with subtraction and for boolean automata over a free label-sets with no epsilon-transitions allowed.");
92 template <
typename Aut0,
typename Aut2>
111 template <
typename Lhs,
typename Rhs>
112 typename Lhs::element_type::automaton_nocv_t
The Boolean semring.
Definition: b.hh:38
static constexpr TOP< void > value
Definition: priority.hh:93
Definition: priority.hh:52
auto are_equivalent_(const Aut1 &aut1, const Aut2 &aut2, priority::FIVE< P >) -> typename std::enable_if<(labelset_t_of< Aut1 >::is_free() &&std::is_same< weightset_t_of< Aut1 >, b >::value &&labelset_t_of< Aut2 >::is_free() &&std::is_same< weightset_t_of< Aut2 >, b >::value), bool >::type
Check equivalence between Boolean automata on a free labelset.
Definition: are_equivalent.hh:45
bool is_empty(const Aut &aut) ATTRIBUTE_PURE
Test whether the automaton has no state.
Definition: accessible.hh:365
auto complement(const Aut &aut, bool keep_history=true) -> decltype(copy(aut))
Complementation of a deterministic complete automaton.
Definition: complement.hh:79
auto complete(const Aut &aut, bool keep_history=true) -> decltype(copy(aut, keep_history))
Completion of a deterministic automaton.
Definition: complete.hh:90
bool are_equivalent(const Aut0 &aut1, const Aut2 &aut2)
Tests if aut1 and aut2 are equivalent.
Definition: are_equivalent.hh:93
auto product(const Lhs &lhs, const Rhs &rhs, bool keep_history=true) -> decltype(join_automata(lhs, rhs))
Definition: product.hh:394
bool is_useless(const Aut &aut)
Test whether the automaton has useful states.
Definition: accessible.hh:321
bool is_deterministic(const Aut &aut)
tests whether the automaton is deterministic
Definition: determinize.hh:210
bool is_complete(const Aut &aut)
Whether aut is complete.
Definition: is_complete.hh:28
typename internal::labelset_t_of_impl< internal::base_t< ValueSet > >::type labelset_t_of
Helper to retrieve the type of the labelset of a value set.
Definition: traits.hh:76
auto determinize(const Aut &a, bool keep_history=true) -> mutable_automaton< context_t_of< Aut >>
Determinization of the automaton.
Definition: determinize.hh:41
auto to_lal(const Aut &aut, direction_t dir=BACKWARD, bool prune=true, bool keep_history=true) -> typename internal::dispatch_lal_lan< Aut, labelset_t_of< Aut >>::l_automaton_t
Definition: lal_lan_conversion.hh:87
Aut reduce(const Aut &input)
Definition: reduce.hh:619
Lhs::element_type::automaton_nocv_t difference(const Lhs &aut1, const Rhs &aut2)
Computes an automaton that accepts every word accepted by aut1 which is not accepted by aut2.
Definition: are_equivalent.hh:113
Aut::element_type::automaton_nocv_t left_mult(const Aut &aut, const weight_t_of< Aut > &w, bool standard=false)
Definition: left_mult.hh:125
Main namespace of Awali.
Definition: ato.hh:22