31 template <
typename Aut>
38 template <
typename Aut>
48 template <
typename Aut>
55 template <
typename Aut>
65 template <
typename Aut>
72 template <
typename Aut>
82 template <
typename Aut>
89 template <
typename Aut>
99 template <
typename Aut>
106 template <
typename Aut>
116 template <
typename Aut>
123 template <
typename Aut>
133 template <
typename Aut>
140 template <
typename Aut>
150 template <
typename Aut>
157 template <
typename Aut>
168 template <
typename Aut>
176 template <
typename Aut>
181 for (
auto t : aut->transitions())
182 res += aut->labelset()->is_one(aut->label_of(t));
190 template <
typename Aut>
195 for (
auto s: a->all_states())
196 res += !a->state_is_strict(s);
205 template <
typename Aut>
207 info(
const Aut& aut, std::ostream& out,
bool detailed =
false)
211 #define ECHO(Name, Value) \
212 out << Name ": " << Value << '\n'
213 ECHO(
"number of states", aut->num_states());
215 ECHO(
"number of initial states", aut->num_initials());
216 ECHO(
"number of final states", aut->num_finals());
220 ECHO(
"number of codeterministic states",
222 ECHO(
"number of deterministic states",
224 ECHO(
"number of transitions", aut->num_transitions());
225 ECHO(
"number of spontaneous transitions",
228 ECHO(
"number of strongly connected components",
248 out <<
"is valid: " <<
is_valid(aut);
257 template <
typename Aut,
typename Ostream,
typename Bool>
261 info(aut->as<Aut>(), out, detailed);
272 template <
typename ExpSet>
274 info(
const ExpSet&
rs,
const typename ExpSet::value_t& e,
280 o <<
"\nsize: " << rat::size<ExpSet>(e);
282 auto info = rat::make_info<ExpSet>(e);
283 o <<
"\nwidth: " << info.atom;
285 o << "\n" #Type ": " << info.Type
310 template <
typename ExpSet,
typename Ostream>
313 const auto& e = exp->as<ExpSet>();
314 vcsn::info(e.expressionset(), e.expression(), o);
ATTRIBUTE_CONST bool is_eps_acyclic(const Aut &aut)
size_t num_useful_states(const Aut &a)
Number of accessible states, not counting pre() and post().
vcsn::enable_if_t< labelset_t_of< Aut >::is_free(), bool > is_complete(const Aut &a)
ATTRIBUTE_CONST vcsn::enable_if_t<!labelset_t_of< Aut >::has_one(), size_t > num_spontaneous_transitions(const Aut &)
vcsn::enable_if_t< labelset_t_of< Aut >::is_free(), size_t > num_codeterministic_states(const Aut &a)
vcsn::enable_if_t< labelset_t_of< Aut >::is_free(), bool > is_cycle_ambiguous(const Aut &a)
ValueSet::value_t ldiv(const ValueSet &vs, const typename ValueSet::value_t &lhs, const typename ValueSet::value_t &rhs)
Left-division of values.
#define ECHO(Name, Value)
size_t num_deterministic_states(const Aut &aut)
Number of non-deterministic states.
typename std::enable_if< Cond, T >::type enable_if_t
bool is_synchronizing(const Aut &aut)
Whether this automaton is synchronizing, i.e., has synchronizing words.
bool is_useless(const Aut &a)
Whether all no state is useful.
auto infiltration(const A1 &a1, const A2 &a2) -> tuple_automaton< decltype(join_automata(a1, a2)), A1, A2 >
The (accessible part of the) infiltration product.
ValueSet::value_t tuple(const ValueSet &vs, const typename ValueSets::value_t &...v)
vcsn::enable_if_t< labelset_t_of< Aut >::is_free(), bool > is_deterministic(const Aut &a)
bool is_ambiguous(const Aut &aut)
auto shuffle(const Auts &...as) -> tuple_automaton< decltype(join_automata(as...)), Auts...>
The (accessible part of the) shuffle product.
scc_automaton< Aut > scc(const Aut &aut, const std::string &algo="auto")
Get scc_automaton from aut.
vcsn::enable_if_t< labelset_t_of< Aut >::is_free(), size_t > num_deterministic_states(const Aut &a)
bool is_standard(const Aut &a)
Whether a is standard.
bool is_complete(const Aut &aut)
Whether aut is complete.
fresh_automaton_t_of< Aut > star(const Aut &aut)
Star of a standard automaton.
std::shared_ptr< detail::automaton_base > automaton
auto conjunction(const Auts &...as) -> tuple_automaton< decltype(meet_automata(as...)), Auts...>
Build the (accessible part of the) conjunction.
size_t num_coaccessible_states(const Aut &a)
Number of accessible states, not counting pre() and post().
std::size_t num_components(const scc_automaton< Aut > &aut)
Get number of strongly connected components.
std::ostream & info_expression(const expression &exp, std::ostream &o)
Bridge (info).
bool is_empty(const Aut &a) ATTRIBUTE_PURE
Whether has no states.
bool is_trim(const Aut &a)
Whether all its states are useful.
size_t num_lazy_states(const Aut &a)
vcsn::enable_if_t< labelset_t_of< Aut >::is_free(), bool > is_codeterministic(const Aut &a)
bool is_codeterministic(const Aut &aut)
Whether the transpositive automaton is deterministic.
bool is_valid(const Aut &aut)
bool is_normalized(const Aut &a)
Whether a is standard and co-standard.
auto sum(const A &lhs, const B &rhs) -> decltype(join_automata(lhs, rhs))
bool is_cycle_ambiguous(const Aut &aut)
Whether aut is cycle-ambiguous.
bool is_proper(const Aut &aut)
Test whether an automaton is proper.
bool is_deterministic(const Aut &aut, state_t_of< Aut > s)
Whether state s is deterministic in aut.
vcsn::enable_if_t< labelset_t_of< Aut >::is_free(), bool > is_ambiguous(const Aut &a)
auto complement(const Aut &aut) -> decltype(copy(aut))
std::shared_ptr< detail::expression_base > expression
std::ostream & info(const automaton &aut, std::ostream &out, bool detailed)
Bridge.
vcsn::enable_if_t< labelset_t_of< Aut >::is_free(), bool > is_synchronizing(const Aut &a)
std::ostream & info(const Aut &aut, std::ostream &out, bool detailed=false)
size_t num_codeterministic_states(const Aut &aut)
Number of non-deterministic states of transpositive automaton.
size_t num_accessible_states(const Aut &a)
Number of accessible states, not counting pre() and post().