Vcsn  2.2a
Be Rational
constant.hh
Go to the documentation of this file.
1 #pragma once
2 
4 #include <vcsn/dyn/context.hh>
5 #include <vcsn/dyn/expression.hh>
6 
7 namespace vcsn
8 {
9  namespace dyn
10  {
11  namespace detail
12  {
14  template <typename Context, typename Identities>
16  {
17  const auto& c = ctx->as<Context>();
18  auto rs = vcsn::make_expressionset(c, ids);
19  return dyn::make_expression(rs, rs.one());
20  }
21 
23  template <typename Context, typename Identities>
25  {
26  const auto& c = ctx->as<Context>();
27  auto rs = vcsn::make_expressionset(c, ids);
28  return dyn::make_expression(rs, rs.zero());
29  }
30  }
31  }
32 } // namespace vcsn
expression expression_zero(const context &ctx, rat::identities ids)
Bridge.
Definition: constant.hh:24
expressionset< Context > make_expressionset(const Context &ctx, rat::identities identities={})
Shorthand to expressionset constructor.
expression make_expression(const ExpSet &rs, const typename ExpSet::value_t &r)
Definition: expression.hh:97
expression expression_one(const context &ctx, rat::identities ids)
Bridge.
Definition: constant.hh:15
std::shared_ptr< const detail::context_base > context
A dyn::context.
Definition: fwd.hh:26
auto rs
Definition: lift.hh:151
static identities ids(const driver &d)
Get the identities of the driver.
Definition: parse.cc:89
static dyn::context ctx(const driver &d)
Get the context of the driver.
Definition: parse.cc:82
std::shared_ptr< detail::expression_base > expression
Definition: expression.hh:92
An expressionset can implement several different sets of identities on expressions.
Definition: identities.hh:21
Definition: a-star.hh:8