30 template <
typename Value>
32 const std::string&
format =
"default")
34 std::ostringstream
os;
56 auto&& is = std::istringstream{data};
61 "unexpected trailing characters: ", is);
64 catch (
const std::runtime_error& e)
75 std::istringstream is{s};
80 "unexpected trailing characters: ", is);
83 catch (
const std::runtime_error& e)
93 auto&& is = std::istringstream{s};
98 "unexpected trailing characters: ", is);
101 catch (
const std::runtime_error& e)
110 auto&& is = std::istringstream{s};
115 "unexpected trailing characters: ", is);
118 catch (
const std::runtime_error& e)
127 auto&& is = std::istringstream{s};
132 "unexpected trailing characters: ", is);
135 catch (
const std::runtime_error& e)
143 const std::string&
format)
153 template <
typename Lhs,
typename Rhs>
155 -> decltype(l->vname(),
r->vname(), bool())
160 template <
typename Lhs,
typename Rhs>
162 -> decltype(l->vname(),
r->vname(), bool())
167 template <
typename Lhs,
typename Rhs>
174 template <
typename Lhs,
typename Rhs>
181 template <
typename Lhs,
typename Rhs>
188 template <
typename Lhs,
typename Rhs>
200 template <
typename Lhs,
typename Rhs>
202 -> decltype(
add(l,
r))
207 template <
typename Lhs,
typename Rhs>
214 template <
typename Lhs,
typename Rhs>
auto operator!=(const Lhs &l, const Rhs &r) -> decltype(l->vname(), r->vname(), bool())
weightset_mixin< detail::r_impl > r
auto operator>=(const Lhs &l, const Rhs &r) -> decltype(compare(l, r) >=0)
auto operator<(const Lhs &l, const Rhs &r) -> decltype(compare(l, r)< 0)
label make_word(const context &ctx, const std::string &s, const std::string &format="default")
Build a word from a string.
automaton strip(const automaton &a)
The automaton in a with its metadata layers removed.
std::ostream & print(const automaton &aut, std::ostream &out=std::cout, const std::string &format="default")
Print automaton a on out using format format.
automaton multiply(const automaton &lhs, const automaton &rhs, const std::string &algo="auto")
Multiply (concatenate) two automata.
std::string configuration(const std::string &key)
Main interface to the configuration function key it the 'path' to the desired key using periofs as a ...
auto operator<=(const Lhs &l, const Rhs &r) -> decltype(compare(l, r)<=0)
label make_label(const context &ctx, const std::string &s, const std::string &format="default")
Build a label from a string.
expression make_expression(const context &ctx, const std::string &s, identities ids={}, const std::string &format="default")
Read an expression from a stream.
polynomial read_polynomial(const context &ctx, std::istream &is)
Read a polynomial from a stream.
std::string format(const Value &v, const std::string &format="default")
polynomial make_polynomial(const context &ctx, const std::string &s)
Build a polynomial from a string.
weight make_weight(const context &ctx, const std::string &s)
Build a weight from a string.
automaton make_automaton(const std::string &data, const std::string &format="default", bool strip=true)
Read an automaton from a string.
std::ostringstream os
The output stream: the corresponding C++ snippet to compile.
label read_label(const context &ctx, std::istream &is, const std::string &format="default")
Read a label from a stream.
expression read_expression(const context &ctx, identities ids, std::istream &is, const std::string &format="default", const location &loc=location{})
Read an expression from a stream.
automaton read_automaton(std::istream &is, const std::string &format="default", bool strip=true, const location &loc=location{})
Read an automaton from a stream.
std::string configuration(const std::string &key)
Access a configuration value.
Template-less root for contexts.
int compare(const automaton &lhs, const automaton &rhs)
Three-way comparison between automata.
void require(Bool b, Args &&... args)
If b is not verified, raise an error with args as message.
ATTRIBUTE_NORETURN void raise(Args &&... args)
Raise a runtime_error with the concatenation of args as message.
static identities ids(const driver &d)
Get the identities of the driver.
An expressionset can implement several different sets of identities on expressions.
An input/output format for valuesets.
Provide a variadic mul on top of a binary mul(), and one().
auto operator+(const Lhs &l, const Rhs &r) -> decltype(add(l, r))
context make_word_context(const context &ctx)
The context for words.
auto operator==(const Lhs &l, const Rhs &r) -> decltype(l->vname(), r->vname(), bool())
bool less_than(const automaton &lhs, const automaton &rhs)
Ordering between automata.
automaton add(const automaton &lhs, const automaton &rhs, const std::string &algo="auto")
Sum of two automata.
weight read_weight(const context &ctx, std::istream &is)
Read a weight from a stream.
auto operator>(const Lhs &l, const Rhs &r) -> decltype(compare(l, r) > 0)
auto operator*(const Lhs &l, const Rhs &r) -> decltype(multiply(l, r))
bool are_equal(const automaton &lhs, const automaton &rhs)
Whether are the same automaton.
auto operator &(const Lhs &l, const Rhs &r) -> decltype(conjunction(l, r))
automaton conjunction(const automaton &lhs, const automaton &rhs, bool lazy=false)
The conjunction (aka synchronized product) of automata.