27 template <
typename ExpSet>
29 :
public ExpSet::const_visitor
36 static_assert(std::is_same<weightset_t, b>::value,
37 "star_normal_form: requires Boolean weights");
39 using weight_t =
typename weightset_t::value_t;
41 using super_t =
typename ExpSet::const_visitor;
44 constexpr
static const char*
me() {
return "star_normal_form"; }
90 v.head()->accept(*
this);
92 for (
auto c:
v.tail())
94 res_ = std::move(res);
107 void visit(const tuple_t&,
std::true_type)
override 109 raise(
me(),
": tuple is not supported");
139 for (
auto c: v.tail())
141 res_ = std::move(res);
149 for (
auto c: v.tail())
151 res_ = std::move(res);
180 template <
typename ExpSet>
181 typename ExpSet::value_t
193 template <
typename ExpSet>
197 const auto& e = exp->as<ExpSet>();
std::shared_ptr< const node< Context > > expression
typename detail::weightset_t_of_impl< base_t< ValueSet > >::type weightset_t_of
void visit(const tuple_t &, std::true_type) override
bool any_of(const Range &r, Predicate p)
void dot_of(const mul_t &v)
Handling of a product by the dot operator.
An inner node with multiple children.
typename weightset_t::value_t weight_t
expression_t rec_(const expression_t &v)
Easy recursion.
operation_t
The type of the operator.
weightset_t ws_
Shorthand to the weightset.
An inner node to name the subexpression.
typename detail::context_t_of_impl< base_t< ValueSet > >::type context_t_of
star_normal_form_visitor(const expressionset_t &rs)
expression_t operator()(const expression_t &v)
typename expressionset_t::value_t expression_t
expression star_normal_form(const expression &exp)
Bridge.
operation_t operation_
The current operation.
void box_of(const mul_t &v)
Handling of a product by the box operator.
expression_t res_
The result.
An inner node implementing a weight.
typename super_t::tuple_t tuple_t
context_t_of< expressionset_t > context_t
value_impl< detail::expression_tag > expression
weight_t_of< ExpSet > constant_term(const ExpSet &rs, const typename ExpSet::value_t &e)
The constant term of e.
ExpSet::value_t star_normal_form(const ExpSet &rs, const typename ExpSet::value_t &e)
Star-normal form of an expression.
typename ExpSet::const_visitor super_t
#define VCSN_RAT_UNSUPPORTED(Type)
weightset_t_of< context_t > weightset_t
static constexpr const char * me()
Name of this algorithm, for error messages.