18 template <
typename LabelSet,
typename WeightSet>
27 using kind_t =
typename labelset_t::kind_t;
38 using label_t =
typename labelset_t::value_t;
40 using weight_t =
typename weightset_t::value_t;
57 :
context(std::make_shared<const labelset_t>(ls),
58 std::make_shared<const weightset_t>(ws))
87 auto ls = labelset_t::make(is);
89 while (isspace(is.peek()))
91 auto ws = weightset_t::make(is);
132 static constexpr
bool 135 return labelset_t::has_one();
145 template <
typename LabelSet,
typename WeightSet>
152 template <
typename LabelSet,
typename WeightSet>
157 template <
typename LabelSet,
typename WeightSet>
167 template <
typename... ValueSets>
172 template <
typename ValueSet>
180 template <
typename ValueSet1,
typename ValueSet2,
typename ValueSet3,
183 meet(
const ValueSet1& vs1,
const ValueSet2& vs2,
const ValueSet3& vs3,
185 -> decltype(
meet(
meet(vs1, vs2), vs3, vs...))
187 return meet(
meet(vs1, vs2), vs3, vs...);
198 template <
typename LS1,
typename WS1,
199 typename LS2,
typename WS2>
223 template <
typename LhsLabelSet,
typename LhsWeightSet,
224 typename RhsLabelSet,
typename RhsWeightSet>
231 auto ls =
meet(*a.labelset(), *
b.labelset());
232 auto ws =
join(*a.weightset(), *
b.weightset());
Print as a parsable type string.
decltype(join(std::declval< ValueSets >()...)) join_t
The type of the join of the ValueSets.
auto meet(const expressionset< Ctx1 > &a, const expressionset< Ctx2 > &b) -> expressionset< meet_t< Ctx1, Ctx2 >>
The meet of two expressionsets.
typename labelset_t::value_t label_t
Type of transition labels, and type of expression atoms.
static type join(const context< LS1, WS1 > &ctx1, const context< LS2, WS2 > &ctx2)
typename weightset_t::value_t weight_t
Type of weights.
char eat(std::istream &is, char c)
Check lookahead character and advance.
join_t< LS1, LS2 > labelset_t
typename labelset_t::kind_t kind_t
std::ostream & print_set(std::ostream &o, format fmt={}) const
context & operator=(context &&that)
boost::flyweight< std::string, boost::flyweights::no_tracking, boost::flyweights::intermodule_holder > symbol
An internalized string.
static constexpr bool has_one()
Ctx make_context(const std::string &name)
Build a context from its name.
context(const context &that)
Print as rich UTF-8 text, escaped.
An input/output format for valuesets.
Provide a variadic mul on top of a binary mul(), and one().
join_t< WS1, WS2 > weightset_t
static symbol sname()
The name of this context, built from its parameters.
auto join(const ValueSet &vs) -> ValueSet
The join of a single valueset.
A structure that implements the computation of join(V1, V2).
context(const labelset_t &ls={}, const weightset_t &ws={})
Build a context.
std::string type(const automaton &a)
The implementation type of a.
std::shared_ptr< const weightset_t > weightset_ptr
Print as plain (ASCII) text, escaped.
void swap(config::value &first, config::value &second)
context(const labelset_ptr &ls, const weightset_ptr &ws)
decltype(meet(std::declval< ValueSets >()...)) meet_t
Print as is. For instance, don't try to escape labels.
std::shared_ptr< const labelset_t > labelset_ptr
const labelset_ptr & labelset() const
full_context_t weightset_t
static context make(std::istream &is)
Build from the description in is.
Whether a ValueSet, or a context, is multitape.
const weightset_ptr & weightset() const