Assert(eq.getNode().getKind() == kind::EQUAL);
SumPair sp = eq.toSumPair();
+ if(sp.isNonlinear()){
+ return;
+ }
+
uint32_t length = sp.maxLength();
if(length > d_maxInputCoefficientLength){
d_maxInputCoefficientLength = length;
* orig can either be of the form (= p c) or (and ub lb).
* where ub is either (leq p c) or (not (> p [- c 1])), and
* where lb is either (geq p c) or (not (< p [+ c 1]))
+ *
+ * If eq cannot be used, this constraint is dropped.
*/
void pushInputConstraint(const Comparison& eq, Node reason);
return integralCoefficient() && integralVariables();
}
+ /** Returns true if the VarList is a product of at least 2 Variables.*/
+ bool isNonlinear() const {
+ return getVarList().size() >= 2;
+ }
+
/**
* Given a sorted list of monomials, this function transforms this
* into a strictly sorted list of monomials that does not contain zero.
return true;
}
+ /** Returns true if the polynomial contains a non-linear monomial.*/
+ bool isNonlinear() const;
+
/**
* Selects a minimal monomial in the polynomial by the absolute value of
* the coefficient.
return getConstant().isZero() && isConstant();
}
+ bool isNonlinear() const{
+ return getPolynomial().isNonlinear();
+ }
+
/**
* Returns the greatest common divisor of gcd(getPolynomial()) and getConstant().
* The SumPair must be integral.