17 #ifndef DYN_ABSTRACT_CONTEXT_HH
18 #define DYN_ABSTRACT_CONTEXT_HH
29 namespace awali {
namespace dyn {
41 virtual std::string
sname()
const =0;
49 virtual std::string
vname(
bool full =
true)
const =0;
58 virtual std::vector<any_t>
alphabet()
const = 0;
auto format(const ValueSet &vs, const typename ValueSet::value_t &v, Args &&... args) -> std::string
Format v via vs.print.
Definition: stream.hh:109
static const std::string full
Completely version of Awali as a std::string.
Definition: version.hh:40
Main namespace of Awali.
Definition: ato.hh:22
Abstract interface representing the weightset and labelset of an automaton, a rational expression or ...
Definition: abstract_context.hh:34
virtual bool show_one() const =0
Returns true if one (neutral multiplicative element of the weightset) should be printed in expression...
virtual bool has_letter(label_t let) const =0
Tests whether let is a valid letter.
virtual void add_letter(label_t let)=0
Adds a letter in the alphabet.
virtual std::string label_to_string(label_t w) const =0
virtual std::string weightset_name(std::string format="text") const =0
Gives the name of the weightset.
virtual std::vector< any_t > alphabet() const =0
Returns the alphabet.
virtual weight_t get_weight(std::string w) const =0
virtual label_t epsilon() const =0
virtual bool is_eps_allowed() const =0
Returns true if epsilon is allowed as label.
virtual bool is_finite_weightset() const =0
virtual label_t get_label(std::string w) const =0
virtual std::string labelset_name() const =0
Gives the name of the labelset.
virtual ~abstract_context_t()
Definition: abstract_context.hh:107
virtual std::string vname(bool full=true) const =0
Returns the runtime internal name of the context.
virtual std::list< any_t > expand_label(any_t l) const =0
virtual bool is_locally_finite_weightset() const =0
virtual weight_t div_weights(weight_t l, weight_t r) const =0
virtual std::string sname() const =0
Returns the compile-time internal name of the context.
virtual std::string weight_to_string(weight_t w) const =0
virtual weight_t weight_zero() const =0
Gives the value zero, that is, the neutral additive element of the weightset.
virtual weight_t add_weights(weight_t l, weight_t r) const =0
virtual weight_t mul_weights(weight_t l, weight_t r) const =0
virtual label_t get_label(std::string w, size_t i) const =0
virtual weight_t weight_one() const =0
Returns the value one, that is, the neutral multiplicative element of the weightset.
Structure used to erase the type of labels/weights at the dyn layer.
Definition: any.hh:52