10 #define LRA_NO_DIVISION
27 template<
typename T1,
typename T2>
63 #ifdef LRA_NO_DIVISION
396 #ifdef LRA_NO_DIVISION
422 if( polyTmp.is_constant() )
423 return (*
mpInfimum) <= polyTmp.constant_part() && (*mpSupremum) >= polyTmp.constant_part();
426 unsigned neqSatisfied = lb->neqRepresentation().satisfiedBy( _ass );
427 assert( neqSatisfied != 2 );
428 if( neqSatisfied == 0 )
433 unsigned neqSatisfied = ub->neqRepresentation().satisfiedBy( _ass );
434 assert( neqSatisfied != 2 );
435 if( neqSatisfied == 0 )
449 assert( polyTmp.is_constant() );
451 if( (*
mpInfimum) > polyTmp.constant_part() )
453 else if ( (*
mpSupremum) < polyTmp.constant_part() )
459 unsigned neqSatisfied = lb->neqRepresentation().satisfiedBy( _ass );
460 assert( neqSatisfied != 2 );
461 if( neqSatisfied == 0 )
462 return lb->neqRepresentation();
466 unsigned neqSatisfied = ub->neqRepresentation().satisfiedBy( _ass );
467 assert( neqSatisfied != 2 );
468 if( neqSatisfied == 0 )
469 return ub->neqRepresentation();
471 return FormulaT( carl::FormulaType::TRUE );
494 assert(
mpInfimum->pOrigins()->front().type() == carl::FormulaType::CONSTRAINT );
511 assert(
mpSupremum->pOrigins()->front().type() == carl::FormulaType::CONSTRAINT );
581 if(
this == &_variable )
583 return this->
id() < _variable.
id();
588 return _variable < *
this;
593 return _variable.
id() == this->
id();
598 return !(_variable == *
this);
605 void print( std::ostream& _out = std::cout )
const;
612 void printAllBounds( std::ostream& _out = std::cout,
const std::string _init =
"" )
const;
622 template<
typename T1,
typename T2>
Stores a bound, which could be an upper "<= b" or a lower bound ">= b" for a bound value b.
carl::PointerSet< Bound< T1, T2 > > BoundSet
A set of pointer to bounds.
bool involvesEquation() const
const Bound< T1, T2 > & infimum() const
const Poly::PolyType & expression() const
Value< T1 > & rAssignment()
Bound< T1, T2 >::BoundSet & rUpperbounds()
std::list< std::list< std::pair< Variable< T1, T2 > *, T2 > > >::iterator positionInNonActives() const
const Poly::PolyType * pExpression() const
bool operator!=(const Variable &_variable) const
const Bound< T1, T2 > * mpSupremum
const Bound< T1, T2 > * pInfimum() const
void setSupremum(const Bound< T1, T2 > *_supremum)
std::pair< const Bound< T1, T2 > *, bool > addUpperBound(Value< T1 > *const _val, ModuleInput::iterator _position, const FormulaT &_constraint, bool _deduced=false)
std::pair< const Bound< T1, T2 > *, bool > addEqualBound(Value< T1 > *const _val, ModuleInput::iterator _position, const FormulaT &_constraint)
const Bound< T1, T2 > * mpInfimum
EntryID startEntry() const
bool operator<(const Variable &_variable) const
const Value< T1 > & assignment() const
const T2 & factor() const
void print(std::ostream &_out=std::cout) const
const Bound< T1, T2 > & supremum() const
RationalInterval getVariableBounds() const
const Bound< T1, T2 >::BoundSet & upperbounds() const
double conflictActivity() const
bool operator==(const Variable &_variable) const
void printAllBounds(std::ostream &_out=std::cout, const std::string _init="") const
const Bound< T1, T2 >::BoundSet & lowerbounds() const
Value< T1 > mLastConsistentAssignment
size_t rLowerBoundsSize()
void setPosition(size_t _position)
bool isConflicting() const
std::list< std::list< std::pair< Variable< T1, T2 > *, T2 > > >::iterator mPositionInNonActives
void setInfimum(const Bound< T1, T2 > *_infimum)
Variable(typename std::list< std::list< std::pair< Variable< T1, T2 > *, T2 >>>::iterator _positionInNonActives, const typename Poly::PolyType *_expression, ModuleInput::iterator _defaultBoundPosition, bool _isInteger, size_t _id)
const Poly::PolyType * mExpression
void setBasic(bool _basic)
bool deactivateBound(const Bound< T1, T2 > *bound, ModuleInput::iterator _position)
void removeBound(const Bound< T1, T2 > *_bound)
void setPositionInNonActives(typename std::list< std::list< std::pair< Variable< T1, T2 > *, T2 >>>::iterator _positionInNonActives)
FormulasT getDefiningOrigins() const
bool operator>(const Variable &_variable) const
FormulaT inConflictWith(const RationalAssignment &_ass) const
Bound< T1, T2 >::BoundSet mUpperbounds
unsigned isSatisfiedBy(const RationalAssignment &_ass) const
Variable(size_t _position, const typename Poly::PolyType *_expression, ModuleInput::iterator _defaultBoundPosition, bool _isInteger, size_t _id)
Bound< T1, T2 >::BoundSet mLowerbounds
const Value< T1 > & lastConsistentAssignment() const
Bound< T1, T2 >::BoundSet & rLowerbounds()
void updateConflictActivity()
size_t rUpperBoundsSize()
std::pair< const Bound< T1, T2 > *, bool > addLowerBound(Value< T1 > *const _val, ModuleInput::iterator _position, const FormulaT &_constraint, bool _deduced=false)
const Bound< T1, T2 > * pSupremum() const
static uint32_t hash(uint32_t x)
static EntryID LAST_ENTRY_ID
bool substitute(const FormulaT &constr, const carl::Variable var, const carl::vs::Term< Poly > &term, FormulaT &result)
Class to create the formulas for axioms.
carl::Formula< Poly > FormulaT
carl::Assignment< Rational > RationalAssignment
carl::Interval< Rational > RationalInterval
carl::Formulas< Poly > FormulasT
int updated
A value to store the information whether this bounds constraint has already been processed (=0),...
size_t operator()(const smtrat::lra::Variable< T1, T2 > &_lraVar) const