16 #include <type_traits>
25 *
this <<
"(E " << v <<
") ";
28 template<
typename Pol>
33 template<
typename Pol>
38 template<
typename Pol>
75 CARL_LOG_ERROR(
"carl.qepcadstream",
"Bitvectors are not supported by QEPCAD.");
82 CARL_LOG_ERROR(
"carl.qepcadstream",
"Uninterpreted equalities are not supported by QEPCAD.");
86 CARL_LOG_ERROR(
"carl.qepcadstream",
"Printing exists or forall is not implemented yet.");
95 void write(
const Monomial::Content::value_type& m) {
96 if (m.second == 0) *
this <<
"1";
97 else if (m.second == 1) *
this << m.first;
99 for (std::size_t i = 0; i < m.second; ++i) *
this <<
" " << m.first;
110 template<
typename Coeff>
115 for (
auto it = mp.
rbegin(); it != mp.
rend(); ++it) {
116 if (it != mp.
rbegin()) *
this <<
" + ";
133 template<
typename Coeff>
145 template<
typename Coeff>
149 for (std::size_t i = 0; i < up.
coefficients().size(); ++i) {
150 if (i > 0) *
this <<
" + ";
153 if (
exp == 0) *
this <<
" " << coeff;
169 default: *
this <<
"?";
break;
183 for (
const auto& v: vars) {
188 template<
typename Pol>
191 for (
const auto& f: formulas) {
197 template<
typename Pol>
204 write(
static_cast<const std::decay_t<T>&
>(t));
#define CARL_LOG_ERROR(channel, msg)
std::vector< Formula< Poly > > Formulas
Interval< Number > exp(const Interval< Number > &i)
bool is_zero(const Interval< Number > &i)
Check if this interval is a point-interval containing 0.
VariableType
Several types of variables are supported.
auto stream_joined(const std::string &glue, const T &v)
Allows to easily output some container with all elements separated by some string.
void variables(const BasicConstraint< Pol > &c, carlVariables &vars)
bool is_one(const Interval< Number > &i)
Check if this interval is a point-interval containing 1.
std::ostream & operator<<(std::ostream &os, const MapleStream &ms)
A Variable represents an algebraic variable that can be used throughout carl.
std::string name() const
Retrieves the name of the variable.
This class represents a univariate polynomial with coefficients of an arbitrary type.
bool is_constant() const
Checks whether the polynomial is constant with respect to the main variable.
const std::vector< Coefficient > & coefficients() const &
Retrieves the coefficients defining this polynomial.
Variable main_var() const
Retrieves the main variable of this polynomial.
NumberType constant_part() const
Returns the constant part of this polynomial.
The general-purpose multivariate polynomial class.
const Term< Coeff > & lterm() const
The leading term.
std::size_t nr_terms() const
Calculate the number of terms.
The general-purpose monomials.
std::shared_ptr< const Monomial > Arg
const Content & exponents() const
Coefficient & coeff()
Get the coefficient.
Monomial::Arg & monomial()
Get the monomial.
Represent a polynomial (in)equality against zero.
Relation relation() const
Represent an SMT formula, which can be an atom for some background theory or a boolean combination of...
const VariableAssignment< Pol > & variable_assignment() const
const Formula & subformula() const
const VariableComparison< Pol > & variable_comparison() const
carl::Variable::Arg boolean() const
const Constraint< Pol > & constraint() const
const Formulas< Pol > & subformulas() const
void write(const Monomial::Arg &m)
QEPCADStream & operator<<(T &&t)
void write(const Formula< Pol > &f)
QEPCADStream & operator<<(std::ostream &(*os)(std::ostream &))
void initialize(const carlVariables &vars)
void write(const Formulas< Pol > &f, const std::string &op)
void write(const Variable &v)
std::stringstream mStream
void initialize(std::initializer_list< Formula< Pol >> formulas)
void write(const MultivariatePolynomial< Coeff > &mp)
void write(const Constraint< Pol > &c)
void assertFormula(const Formula< Pol > &formula)
void write(const Term< Coeff > &t)
void write(const VariableType &vt)
void write(const Monomial &m)
void write(const UnivariatePolynomial< Coeff > &up)
void write(const Monomial::Content::value_type &m)