16 template <
typename ExpSet>
18 :
public ExpSet::const_visitor
22 using super_t =
typename expressionset_t::const_visitor;
26 using node_t =
typename expressionset_t::node_t;
62 template <
typename OtherExpSet>
85 constexpr
static const char*
me() {
return "info"; }
90 #define DEFINE(Type) \
94 VCSN_RAT_VISIT(Type, v)
113 template <type_t Type>
117 template <rat::exp::type_t Type>
120 v.
sub()->accept(*
this);
124 template <type_t Type>
128 template <exp::type_t Type>
132 for (
const auto& c: v)
135 d = std::max(d, depth);
150 template <
bool = context_t::is_lat,
151 typename Dummy =
void>
158 using expset_t =
typename expressionset_t::template project_t<I>;
159 visitor_ += make_info<expset_t>(std::get<I>(v.sub()));
163 template <
size_t... I>
166 using swallow =
int[];
184 template <
typename Dummy>
200 template <
typename ExpSet>
static constexpr const char * me()
Name of this algorithm, for error messages.
void info_(const tuple_t &v, detail::index_sequence< I... >)
Info all the tapes.
info< ExpSet > make_info(const typename ExpSet::value_t &r)
typename expressionset_t::node_t node_t
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
Provide a variadic mul on top of a binary mul(), and one().
An inner node with multiple children.
#define BUILTIN_UNREACHABLE()
const value_t sub() const
void visit_(const variadic_t< Type > &v)
Factor the visitation of variadic nodes.
context_t_of< expressionset_t > context_t
void operator()(const tuple_t &)
size_t tuple
Number of tuple operators.
Gather information of the number of the different node types.
void visit(const tuple_t &v, std::true_type) override
typename expressionset_t::const_visitor super_t
void operator()(const std::shared_ptr< const node_t > &v)
Entry point: compute info about v.
typename detail::context_t_of_impl< base_t< ValueSet >>::type context_t_of
typename super_t::tuple_t tuple_t
An inner node implementing a weight.
size_t depth
Depth of the tree.
void operator()(const node_t &v)
For each node type, count its number of occurrences.
std::ostream & info(const Aut &aut, std::ostream &out, bool detailed=false)
info & operator+=(const info< OtherExpSet > &other)
Add the result from another info operator.
Implementation of nodes of tuple of rational expressions.
void visit_(const unary_t< Type > &v)
Factor the visitation of unary nodes.
void info_(const tuple_t &v)
Info about tape I.
void operator()(const tuple_t &v)
Entry point.