SMT-RAT
24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
|
#include <Projection.h>
Public Member Functions | |
Projection (const Constraints &c) | |
void | reset () |
carl::Bitset | addPolynomial (const UPoly &p, std::size_t cid, bool) override |
void | removePolynomial (const UPoly &, std::size_t cid, bool) override |
bool | testProjectionFactor (std::size_t level, std::size_t id) const |
void | removeProjectionFactor (std::size_t level, std::size_t id) |
std::size_t | size (std::size_t level) const override |
bool | empty (std::size_t level) const override |
bool | hasPolynomialById (std::size_t level, std::size_t id) const override |
const UPoly & | getPolynomialById (std::size_t level, std::size_t id) const override |
Retrieves a polynomial from its id. More... | |
std::size_t | dim () const |
Returns the dimension of the projection. More... | |
virtual std::size_t | size (std::size_t level) const=0 |
std::size_t | size () const |
std::size_t | dim () const |
Returns the dimension of the projection. More... | |
const auto & | vars () const |
Returns the variables used for projection. More... | |
template<typename F > | |
void | setRemoveCallback (F &&f) |
Sets a callback that is called whenever polynomials are removed. More... | |
carl::Bitset | addPolynomial (const Poly &p, std::size_t cid, bool isBound) |
Adds the given polynomial to the projection. Converts to a UPoly and calls the appropriate overload. More... | |
virtual carl::Bitset | addPolynomial (const UPoly &p, std::size_t cid, bool isBound)=0 |
Adds the given polynomial to the projection. More... | |
carl::Bitset | addEqConstraint (const Poly &p, std::size_t cid, bool isBound) |
Adds the given polynomial of an equational constraint to the projection. Converts to a UPoly and calls the appropriate overload. More... | |
virtual carl::Bitset | addEqConstraint (const UPoly &p, std::size_t cid, bool isBound) |
Adds the given polynomial of an equational constraint to the projection. More... | |
void | removePolynomial (const Poly &p, std::size_t cid, bool isBound) |
Removes the given polynomial from the projection. Converts to a UPoly and calls the appropriate overload. More... | |
virtual void | removePolynomial (const UPoly &p, std::size_t cid, bool isBound)=0 |
Removes the given polynomial from the projection. More... | |
std::size_t | size () const |
virtual bool | empty () |
OptionalID | getPolyForLifting (std::size_t level, SampleLiftedWith &slw) |
Get a polynomial from this level suited for lifting. More... | |
virtual void | exportAsDot (std::ostream &) const |
virtual Origin | getOrigin (std::size_t level, std::size_t id) const |
Protected Member Functions | |
void | callRemoveCallback (std::size_t level, const SampleLiftedWith &slw) const |
std::size_t | getID (std::size_t level) |
Returns a fresh polynomial id for the given level. More... | |
void | freeID (std::size_t level, std::size_t id) |
Frees a currently used polynomial id for the given level. More... | |
carl::Variable | var (std::size_t level) const |
Returns the variable that corresponds to the given level, that is the variable eliminated in this level. More... | |
bool | canBePurgedByBounds (const UPoly &p) const |
Checks whether a polynomial can safely be ignored due to the bounds. More... | |
bool | isPurged (std::size_t level, std::size_t id) |
Protected Attributes | |
const Constraints & | mConstraints |
ProjectionInformation | mInfo |
Additional info on projection, projection levels and projection polynomials. More... | |
std::function< void(std::size_t, const SampleLiftedWith &)> | mRemoveCallback |
Callback to be called when polynomials are removed. The arguments are the projection level and a bitset that indicate which polynomials were removed in this level. More... | |
Private Types | |
using | Super = BaseProjection< Settings > |
using | Constraints = CADConstraints< Settings::backtracking > |
Private Member Functions | |
auto & | polyIDs (std::size_t level) |
const auto & | polyIDs (std::size_t level) const |
auto & | polys (std::size_t level) |
const auto & | polys (std::size_t level) const |
carl::Bitset | addToProjection (std::size_t level, const UPoly &p, const Origin::BaseType &origin) |
void | callRemoveCallback (std::size_t level, const SampleLiftedWith &slw) const |
std::size_t | getID (std::size_t level) |
Returns a fresh polynomial id for the given level. More... | |
void | freeID (std::size_t level, std::size_t id) |
Frees a currently used polynomial id for the given level. More... | |
carl::Variable | var (std::size_t level) const |
Returns the variable that corresponds to the given level, that is the variable eliminated in this level. More... | |
Private Attributes | |
std::vector< std::map< UPoly, std::size_t > > | mPolynomialIDs |
std::vector< std::vector< std::optional< std::pair< UPoly, Origin > > > > | mPolynomials |
std::vector< PolynomialLiftingQueue< BaseProjection > > | mLiftingQueues |
List of lifting queues that can be used for incremental projection. More... | |
ProjectionOperator | mOperator |
The projection operator. More... | |
std::vector< carl::IDPool > | mIDPools |
Lift of id pools to generate fresh IDs for polynomials. More... | |
Friends | |
template<typename S > | |
std::ostream & | operator<< (std::ostream &os, const Projection< S > &p) |
Definition at line 19 of file Projection.h.
|
private |
Definition at line 22 of file BaseProjection.h.
|
private |
Definition at line 21 of file Projection.h.
|
inline |
Definition at line 93 of file Projection.h.
|
inlineinherited |
Adds the given polynomial of an equational constraint to the projection. Converts to a UPoly and calls the appropriate overload.
Definition at line 117 of file BaseProjection.h.
|
inlinevirtualinherited |
Adds the given polynomial of an equational constraint to the projection.
Reimplemented in smtrat::cad::Projection< Incrementality::FULL, Backtracking::HIDE, Settings >.
Definition at line 121 of file BaseProjection.h.
|
inlineinherited |
Adds the given polynomial to the projection. Converts to a UPoly and calls the appropriate overload.
Definition at line 111 of file BaseProjection.h.
|
pure virtualinherited |
Adds the given polynomial to the projection.
Implemented in smtrat::cad::Projection< Incrementality::NONE, Backtracking::UNORDERED, Settings >, smtrat::cad::Projection< Incrementality::NONE, Backtracking::ORDERED, Settings >, smtrat::cad::ModelBasedProjection< Incrementality::NONE, Backtracking::ORDERED, Settings >, smtrat::cad::Projection< Incrementality::FULL, BT, Settings >, smtrat::cad::Projection< Incrementality::FULL, Backtracking::HIDE, Settings >, and smtrat::cad::Projection< Incrementality::SIMPLE, BT, Settings >.
|
inlineoverride |
|
inlineprivate |
Definition at line 57 of file Projection.h.
|
inlineprotectedinherited |
|
inlineprivate |
|
inlineprotectedinherited |
Checks whether a polynomial can safely be ignored due to the bounds.
Definition at line 59 of file BaseProjection.h.
|
inlineinherited |
Returns the dimension of the projection.
Definition at line 88 of file BaseProjection.h.
|
inline |
Returns the dimension of the projection.
Definition at line 88 of file BaseProjection.h.
|
inlinevirtualinherited |
Definition at line 140 of file BaseProjection.h.
|
inlineoverridevirtual |
Implements smtrat::cad::BaseProjection< Settings >.
Definition at line 161 of file Projection.h.
|
inlinevirtualinherited |
Reimplemented in smtrat::cad::Projection< Incrementality::FULL, BT, Settings >, and smtrat::cad::Projection< Incrementality::FULL, Backtracking::HIDE, Settings >.
Definition at line 168 of file BaseProjection.h.
|
inlineprotectedinherited |
Frees a currently used polynomial id for the given level.
Definition at line 49 of file BaseProjection.h.
|
inlineprivate |
Frees a currently used polynomial id for the given level.
Definition at line 49 of file BaseProjection.h.
|
inlineprotectedinherited |
Returns a fresh polynomial id for the given level.
Definition at line 44 of file BaseProjection.h.
|
inlineprivate |
Returns a fresh polynomial id for the given level.
Definition at line 44 of file BaseProjection.h.
|
inlinevirtualinherited |
Reimplemented in smtrat::cad::Projection< Incrementality::FULL, BT, Settings >.
Definition at line 169 of file BaseProjection.h.
|
inlineinherited |
Get a polynomial from this level suited for lifting.
Definition at line 148 of file BaseProjection.h.
|
inlineoverridevirtual |
Retrieves a polynomial from its id.
Implements smtrat::cad::BaseProjection< Settings >.
Definition at line 170 of file Projection.h.
|
inlineoverridevirtual |
Implements smtrat::cad::BaseProjection< Settings >.
Definition at line 165 of file Projection.h.
|
inlineprotectedinherited |
Definition at line 76 of file BaseProjection.h.
|
inlineprivate |
Definition at line 40 of file Projection.h.
|
inlineprivate |
|
inlineprivate |
Definition at line 48 of file Projection.h.
|
inlineprivate |
|
inlineinherited |
Removes the given polynomial from the projection. Converts to a UPoly and calls the appropriate overload.
Definition at line 125 of file BaseProjection.h.
|
inlineoverride |
|
pure virtualinherited |
Removes the given polynomial from the projection.
Implemented in smtrat::cad::Projection< Incrementality::NONE, Backtracking::ORDERED, Settings >, smtrat::cad::ModelBasedProjection< Incrementality::NONE, Backtracking::ORDERED, Settings >, smtrat::cad::Projection< Incrementality::FULL, BT, Settings >, smtrat::cad::Projection< Incrementality::FULL, Backtracking::HIDE, Settings >, smtrat::cad::Projection< Incrementality::SIMPLE, BT, Settings >, and smtrat::cad::Projection< Incrementality::NONE, Backtracking::UNORDERED, Settings >.
|
inline |
|
inline |
|
inlineinherited |
Sets a callback that is called whenever polynomials are removed.
Definition at line 107 of file BaseProjection.h.
|
inlineinherited |
Definition at line 132 of file BaseProjection.h.
|
inline |
Definition at line 132 of file BaseProjection.h.
|
inlineoverridevirtual |
Implements smtrat::cad::BaseProjection< Settings >.
Definition at line 158 of file Projection.h.
virtual std::size_t smtrat::cad::BaseProjection< Settings >::size | ( | void | ) |
|
inline |
|
inlineprotectedinherited |
Returns the variable that corresponds to the given level, that is the variable eliminated in this level.
Definition at line 54 of file BaseProjection.h.
|
inlineprivate |
Returns the variable that corresponds to the given level, that is the variable eliminated in this level.
Definition at line 54 of file BaseProjection.h.
|
inlineinherited |
Returns the variables used for projection.
Definition at line 94 of file BaseProjection.h.
|
friend |
Definition at line 179 of file Projection.h.
|
protectedinherited |
Definition at line 28 of file BaseProjection.h.
|
privateinherited |
Lift of id pools to generate fresh IDs for polynomials.
Definition at line 25 of file BaseProjection.h.
|
protectedinherited |
Additional info on projection, projection levels and projection polynomials.
Definition at line 32 of file BaseProjection.h.
|
private |
List of lifting queues that can be used for incremental projection.
Definition at line 30 of file BaseProjection.h.
|
private |
The projection operator.
Definition at line 34 of file BaseProjection.h.
|
private |
Definition at line 37 of file Projection.h.
|
private |
Definition at line 38 of file Projection.h.
|
protectedinherited |
Callback to be called when polynomials are removed. The arguments are the projection level and a bitset that indicate which polynomials were removed in this level.
Definition at line 36 of file BaseProjection.h.