Vcsn  2.3
Be Rational
vcsn::rat::inductive_visitor< Aut, ExpSet, Tag > Class Template Reference

Build an automaton by induction from an expression. More...

#include <inductive.hh>

Inheritance diagram for vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >:
Collaboration diagram for vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >:

Classes

struct  visit_tuple
 
struct  visit_tuple< false, Dummy >
 

Public Types

using automaton_t = Aut
 
using expressionset_t = ExpSet
 
using tag_t = Tag
 
using self_t = inductive_visitor
 
using context_t = context_t_of< expressionset_t >
 
using automatonset_t = automatonset< context_t_of< automaton_t >, tag_t >
 
using expression_t = typename expressionset_t::value_t
 
using labelset_t = labelset_t_of< context_t >
 
using weightset_t = weightset_t_of< context_t >
 
using weight_t = weight_t_of< context_t >
 
using state_t = state_t_of< automaton_t >
 
using super_t = typename expressionset_t::const_visitor
 

Public Member Functions

 inductive_visitor (const expressionset_t &rs)
 
automaton_t operator() (const expression_t &v)
 

Static Public Member Functions

static constexpr const charme ()
 Name of this algorithm, for error messages. More...
 

Private Types

using tuple_t = typename super_t::tuple_t
 
template<Automaton AutSet>
using compose_mem_fn_t = decltype(std::declval< AutSet >().compose(std::declval< typename AutSet::value_t >(), std::declval< typename AutSet::value_t >()))
 The type of the AutSet::compose() member function. More...
 
template<typename AutSet >
using has_compose_mem_fn = detail::detect< AutSet, compose_mem_fn_t >
 Whether AutSet features a compose() member function. More...
 

Private Member Functions

automaton_t recurse (const expression_t &v)
 
void visit (const tuple_t &v, std::true_type) override
 
 VCSN_RAT_VISIT (zero,)
 
 VCSN_RAT_VISIT (one,)
 
 VCSN_RAT_VISIT (atom, e)
 
 VCSN_RAT_VISIT (compose, e)
 
 VCSN_RAT_VISIT (conjunction, e)
 
 VCSN_RAT_VISIT (infiltrate, e)
 
 VCSN_RAT_VISIT (ldivide, e)
 
 VCSN_RAT_VISIT (shuffle, e)
 
 VCSN_RAT_VISIT (add, e)
 
 VCSN_RAT_VISIT (mul, e)
 
 VCSN_RAT_VISIT (star, e)
 
 VCSN_RAT_VISIT (complement, e)
 
 VCSN_RAT_VISIT (transposition, e)
 
 VCSN_RAT_VISIT (lweight, e)
 
 VCSN_RAT_VISIT (rweight, e)
 

Private Attributes

expressionset_t rs_
 
automatonset_t as_
 
automaton_t res_ = nullptr
 

Detailed Description

template<Automaton Aut, typename ExpSet, typename Tag>
class vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >

Build an automaton by induction from an expression.

Template Parameters
Autthe type of the generated automaton.
ExpSetthe expressionset.
Tagthe nature of the operations (standard_tag, etc.).

Definition at line 33 of file inductive.hh.

Member Typedef Documentation

template<Automaton Aut, typename ExpSet , typename Tag >
using vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::automaton_t = Aut

Definition at line 37 of file inductive.hh.

template<Automaton Aut, typename ExpSet , typename Tag >
using vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::automatonset_t = automatonset<context_t_of<automaton_t>, tag_t>

Definition at line 43 of file inductive.hh.

template<Automaton Aut, typename ExpSet , typename Tag >
template<Automaton AutSet>
using vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::compose_mem_fn_t = decltype(std::declval<AutSet>() .compose(std::declval<typename AutSet::value_t>(), std::declval<typename AutSet::value_t>()))
private

The type of the AutSet::compose() member function.

Definition at line 147 of file inductive.hh.

template<Automaton Aut, typename ExpSet , typename Tag >
using vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::context_t = context_t_of<expressionset_t>

Definition at line 42 of file inductive.hh.

template<Automaton Aut, typename ExpSet , typename Tag >
using vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::expression_t = typename expressionset_t::value_t

Definition at line 44 of file inductive.hh.

template<Automaton Aut, typename ExpSet , typename Tag >
using vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::expressionset_t = ExpSet

Definition at line 38 of file inductive.hh.

template<Automaton Aut, typename ExpSet , typename Tag >
template<typename AutSet >
using vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::has_compose_mem_fn = detail::detect<AutSet, compose_mem_fn_t>
private

Whether AutSet features a compose() member function.

Definition at line 151 of file inductive.hh.

template<Automaton Aut, typename ExpSet , typename Tag >
using vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::labelset_t = labelset_t_of<context_t>

Definition at line 45 of file inductive.hh.

template<Automaton Aut, typename ExpSet , typename Tag >
using vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::self_t = inductive_visitor

Definition at line 40 of file inductive.hh.

template<Automaton Aut, typename ExpSet , typename Tag >
using vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::state_t = state_t_of<automaton_t>

Definition at line 48 of file inductive.hh.

template<Automaton Aut, typename ExpSet , typename Tag >
using vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::super_t = typename expressionset_t::const_visitor

Definition at line 50 of file inductive.hh.

template<Automaton Aut, typename ExpSet , typename Tag >
using vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::tag_t = Tag

Definition at line 39 of file inductive.hh.

template<Automaton Aut, typename ExpSet , typename Tag >
using vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::tuple_t = typename super_t::tuple_t
private

Definition at line 80 of file inductive.hh.

template<Automaton Aut, typename ExpSet , typename Tag >
using vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::weight_t = weight_t_of<context_t>

Definition at line 47 of file inductive.hh.

template<Automaton Aut, typename ExpSet , typename Tag >
using vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::weightset_t = weightset_t_of<context_t>

Definition at line 46 of file inductive.hh.

Constructor & Destructor Documentation

template<Automaton Aut, typename ExpSet , typename Tag >
vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::inductive_visitor ( const expressionset_t rs)
inline

Definition at line 55 of file inductive.hh.

Member Function Documentation

template<Automaton Aut, typename ExpSet , typename Tag >
static constexpr const char* vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::me ( )
inlinestatic

Name of this algorithm, for error messages.

Definition at line 53 of file inductive.hh.

template<Automaton Aut, typename ExpSet , typename Tag >
automaton_t vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::operator() ( const expression_t v)
inline

Definition at line 60 of file inductive.hh.

References vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::res_, vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::rs_, and vcsn::rat::to_string().

Here is the call graph for this function:

template<Automaton Aut, typename ExpSet , typename Tag >
automaton_t vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::recurse ( const expression_t v)
inlineprivate
template<Automaton Aut, typename ExpSet , typename Tag >
vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::VCSN_RAT_VISIT ( zero  )
inlineprivate

Definition at line 127 of file inductive.hh.

References vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::as_, vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::res_, and vcsn::automatonset< Context, Tag >::zero().

Here is the call graph for this function:

template<Automaton Aut, typename ExpSet , typename Tag >
vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::VCSN_RAT_VISIT ( one  )
inlineprivate

Definition at line 132 of file inductive.hh.

References vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::as_, vcsn::automatonset< Context, Tag >::one(), and vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::res_.

Here is the call graph for this function:

template<Automaton Aut, typename ExpSet , typename Tag >
vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::VCSN_RAT_VISIT ( atom  ,
 
)
inlineprivate

Definition at line 137 of file inductive.hh.

References vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::as_, vcsn::automatonset< Context, Tag >::atom(), and vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::res_.

Here is the call graph for this function:

template<Automaton Aut, typename ExpSet , typename Tag >
vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::VCSN_RAT_VISIT ( compose  ,
 
)
inlineprivate

Definition at line 154 of file inductive.hh.

References vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::as_, vcsn::automatonset< Context, Tag >::compose(), vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::recurse(), vcsn::res, and vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::res_.

Here is the call graph for this function:

template<Automaton Aut, typename ExpSet , typename Tag >
vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::VCSN_RAT_VISIT ( conjunction  ,
 
)
inlineprivate

Definition at line 171 of file inductive.hh.

References vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::as_, vcsn::automatonset< Context, Tag >::conjunction(), vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::recurse(), vcsn::res, vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::res_, and vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::rs_.

Here is the call graph for this function:

template<Automaton Aut, typename ExpSet , typename Tag >
vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::VCSN_RAT_VISIT ( infiltrate  ,
 
)
inlineprivate

Definition at line 189 of file inductive.hh.

References vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::as_, vcsn::automatonset< Context, Tag >::infiltrate(), vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::recurse(), vcsn::res, vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::res_, and vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::rs_.

Here is the call graph for this function:

template<Automaton Aut, typename ExpSet , typename Tag >
vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::VCSN_RAT_VISIT ( ldivide  ,
 
)
inlineprivate

Definition at line 207 of file inductive.hh.

References vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::as_, vcsn::automatonset< Context, Tag >::ldivide(), vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::recurse(), vcsn::res, vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::res_, and vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::rs_.

Here is the call graph for this function:

template<Automaton Aut, typename ExpSet , typename Tag >
vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::VCSN_RAT_VISIT ( shuffle  ,
 
)
inlineprivate

Definition at line 225 of file inductive.hh.

References vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::as_, vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::recurse(), vcsn::res, vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::res_, vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::rs_, and vcsn::automatonset< Context, Tag >::shuffle().

Here is the call graph for this function:

template<Automaton Aut, typename ExpSet , typename Tag >
vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::VCSN_RAT_VISIT ( add  ,
 
)
inlineprivate

Definition at line 243 of file inductive.hh.

References vcsn::automatonset< Context, Tag >::add(), vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::as_, vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::recurse(), vcsn::res, and vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::res_.

Here is the call graph for this function:

template<Automaton Aut, typename ExpSet , typename Tag >
vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::VCSN_RAT_VISIT ( mul  ,
 
)
inlineprivate

Definition at line 251 of file inductive.hh.

References vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::as_, vcsn::automatonset< Context, Tag >::mul(), vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::recurse(), vcsn::res, and vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::res_.

Here is the call graph for this function:

template<Automaton Aut, typename ExpSet , typename Tag >
vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::VCSN_RAT_VISIT ( star  ,
 
)
inlineprivate

Definition at line 259 of file inductive.hh.

References vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::as_, vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::recurse(), vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::res_, and vcsn::automatonset< Context, Tag >::star().

Here is the call graph for this function:

template<Automaton Aut, typename ExpSet , typename Tag >
vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::VCSN_RAT_VISIT ( complement  ,
 
)
inlineprivate

Definition at line 264 of file inductive.hh.

References vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::as_, vcsn::automatonset< Context, Tag >::complement(), vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::recurse(), vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::res_, and vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::rs_.

Here is the call graph for this function:

template<Automaton Aut, typename ExpSet , typename Tag >
vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::VCSN_RAT_VISIT ( transposition  ,
 
)
inlineprivate

Definition at line 279 of file inductive.hh.

References vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::as_, vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::recurse(), vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::res_, and vcsn::automatonset< Context, Tag >::transposition().

Here is the call graph for this function:

template<Automaton Aut, typename ExpSet , typename Tag >
vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::VCSN_RAT_VISIT ( lweight  ,
 
)
inlineprivate

Definition at line 284 of file inductive.hh.

References vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::as_, vcsn::automatonset< Context, Tag >::lweight(), vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::recurse(), and vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::res_.

Here is the call graph for this function:

template<Automaton Aut, typename ExpSet , typename Tag >
vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::VCSN_RAT_VISIT ( rweight  ,
 
)
inlineprivate

Definition at line 289 of file inductive.hh.

References vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::as_, vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::recurse(), vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::res_, and vcsn::automatonset< Context, Tag >::rweight().

Here is the call graph for this function:

template<Automaton Aut, typename ExpSet , typename Tag >
void vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::visit ( const tuple_t v,
std::true_type   
)
inlineoverrideprivate

Definition at line 122 of file inductive.hh.

References vcsn::v.

Member Data Documentation

template<Automaton Aut, typename ExpSet , typename Tag >
automatonset_t vcsn::rat::inductive_visitor< Aut, ExpSet, Tag >::as_
private

The documentation for this class was generated from the following file: