17 #ifndef AWALI_ALGOS_INFO_HH
18 # define AWALI_ALGOS_INFO_HH
30 #include <awali/sttc/algos/synchronizing_word.hh>
34 namespace awali {
namespace sttc {
42 template <
typename Aut>
43 typename std::enable_if<labelset_t_of<Aut>::is_free(),
50 template <
typename Aut>
51 typename std::enable_if<!labelset_t_of<Aut>::is_free(),
61 template <
typename Aut>
62 typename std::enable_if<labelset_t_of<Aut>::is_free(),
69 template <
typename Aut>
70 typename std::enable_if<!labelset_t_of<Aut>::is_free(),
80 template <
typename Aut>
81 typename std::enable_if<labelset_t_of<Aut>::is_free(),
88 template <
typename Aut>
89 typename std::enable_if<!labelset_t_of<Aut>::is_free(),
99 template <
typename Aut>
100 typename std::enable_if<labelset_t_of<Aut>::is_free(),
107 template <
typename Aut>
108 typename std::enable_if<!labelset_t_of<Aut>::is_free(),
118 template <
typename Aut>
119 typename std::enable_if<labelset_t_of<Aut>::is_free(),
126 template <
typename Aut>
127 typename std::enable_if<!labelset_t_of<Aut>::is_free(),
138 template <
typename Aut>
140 typename std::enable_if<!labelset_t_of<Aut>::has_one(),
147 template <
typename Aut>
148 typename std::enable_if<labelset_t_of<Aut>::has_one(),
153 for (
auto t : aut->transitions())
154 res += aut->labelset()->is_one(aut->label_of(t));
158 template <
typename Aut>
172 info(
const A& aut, std::ostream& out,
bool detailed =
false)
174 #define ECHO(Name, Value) \
175 out << Name ": " << Value << '\n'
176 ECHO(
"type", aut->vname(
true));
177 ECHO(
"number of states", aut->num_states());
178 ECHO(
"number of initial states", aut->num_initials());
179 ECHO(
"number of final states", aut->num_finals());
183 ECHO(
"number of transitions", aut->num_transitions());
184 ECHO(
"number of deterministic states",
202 out <<
"is valid: " <<
is_valid(aut);
210 template <
class RatExpSet>
212 info(
const RatExpSet& rs,
const typename RatExpSet::ratexp_t& e,
219 # define DEFINE(Type) \
220 << "\n" #Type ": " << nfo.Type
222 <<
"type: " << rs.vname(
true)
223 <<
"\nsize: " << sizer(e)
#define ECHO(Name, Value)
std::enable_if< labelset_t_of< Aut >::is_free(), bool >::type is_deterministic(const Aut &a)
Definition: info.hh:83
size_t num_eps_transitions(const Aut &aut)
Definition: info.hh:160
std::enable_if< labelset_t_of< Aut >::is_free(), bool >::type is_complete(const Aut &a)
Definition: info.hh:64
std::enable_if<!labelset_t_of< Aut >::is_free(), std::string >::type num_deterministic_states(const Aut &)
Definition: info.hh:129
ATTRIBUTE_CONST std::enable_if<!labelset_t_of< Aut >::has_one(), size_t >::type num_eps_transitions_(const Aut &)
Definition: info.hh:142
std::enable_if< labelset_t_of< Aut >::is_free(), bool >::type is_ambiguous(const Aut &a)
Definition: info.hh:45
std::enable_if< labelset_t_of< Aut >::is_free(), bool >::type is_synchronizing(const Aut &a)
Definition: info.hh:102
std::enable_if< labelset_t_of< Aut >::is_free(), size_t >::type num_deterministic_states(const Aut &a)
Definition: info.hh:121
bool is_empty(const Aut &aut) ATTRIBUTE_PURE
Test whether the automaton has no state.
Definition: accessible.hh:365
std::ostream & info(const A &aut, std::ostream &out, bool detailed=false)
Definition: info.hh:172
size_t num_useful_states(const Aut &aut)
Number of useful states.
Definition: accessible.hh:187
auto shuffle(const Lhs &lhs, const Rhs &rhs, bool keep_history=true) -> decltype(join_automata(lhs, rhs))
Definition: product.hh:445
auto sum(const Aut1 &aut1, const Aut2 &aut2, bool sum_standard=false) -> decltype(join_automata(aut1, aut2))
sums two automata
Definition: sum.hh:137
bool is_synchronizing(const Aut &aut)
Definition: synchronizing_word.hh:567
auto complement(const Aut &aut, bool keep_history=true) -> decltype(copy(aut))
Complementation of a deterministic complete automaton.
Definition: complement.hh:79
bool is_standard(const Aut &a)
Definition: standard.hh:40
Aut::element_type::automaton_nocv_t star(const Aut &aut)
Star of an automaton.
Definition: star.hh:100
size_t num_coaccessible_states(const Aut &aut)
Number of coaccessible states.
Definition: accessible.hh:170
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
bool is_proper(const Aut &aut) ATTRIBUTE_CONST
Test whether an automaton is proper.
Definition: is_proper.hh:94
bool is_ambiguous(const Aut &aut)
Definition: is_ambiguous.hh:27
ATTRIBUTE_CONST bool is_eps_acyclic(const Aut &aut)
Definition: is_eps_acyclic.hh:123
bool is_trim(const Aut &aut)
Test whether the automaton is trim.
Definition: accessible.hh:308
bool is_valid(const Aut &aut)
Tests if aut is valid.
Definition: is_valid.hh:162
size_t num_accessible_states(const Aut &aut)
Number of accessible states.
Definition: accessible.hh:153
bool is_normalized(const Aut &a)
Definition: is_normalized.hh:26
Main namespace of Awali.
Definition: ato.hh:22