15 #include "../SATModule/SATModule.h"
16 #include "../LRAModule/LRAModule.h"
22 template<
typename Settings>
112 Linearization(
const Poly& normalization,
Poly&& linearization, std::vector<Purification *>&& purifications,
bool hasRealVariables)
137 addBackend<SATModule<SATSettings1>>({
138 addBackend<LRAModule<LRASettings1>>()
152 return SettingsType::moduleName;
Container that stores expensive to construct objects and allows the fast lookup with respect to two i...
void updateModel() const
Updates the current assignment into the model.
std::map< carl::Monomial::Arg, Purification > mPurifications
Maps a monomial to its purification information.
void removeCore(ModuleInput::const_iterator _subformula)
Removes the subformula of the received formula at the given position to the considered ones of this m...
void changeActiveDomain(Expansion &expansion, RationalInterval &&domain)
Changes the active domain of a variable and adapts its positional notation to the basis Settings::exp...
Answer analyzeConflict(const FormulaSetT &LRAConflict)
Analyzes the infeasible subset of the LRA solver and constructs an infeasible subset of the received ...
bool mCheckedWithBackends
Stores whether the last consistency check was done by the backends.
Model mLRAModel
Stores the last model for the linearization that was found by the LRA solver.
Answer checkCore()
Checks the received formula for consistency.
Bimap< Linearization, const Poly, &Linearization::mNormalization, const Poly, &Linearization::mLinearization > mLinearizations
DomainSize
Subdivides the size of a variable domain into three classes:
LAModule mLRAModule
Handle to the linear arithmetic module.
CSplitModule(const ModuleInput *_formula, Conditionals &_conditionals, Manager *_manager=nullptr)
bool bloatDomains(const FormulaSetT &LRAConflict)
Bloats the active domains of a subset of variables that are part of the LRA solvers infeasible subset...
Bimap< Expansion, const carl::Variable, &Expansion::mRationalization, const carl::Variable, &Expansion::mDiscretization > mExpansions
void propagateFormula(const FormulaT &formula, bool assert)
Asserts/Removes the given formula to/from the LRA solver.
vb::VariableBounds< FormulaT > mVariableBounds
Helper class that extracts the variable domains.
bool addCore(ModuleInput::const_iterator _subformula)
The module has to take the given sub-formula of the received formula into account.
bool resetExpansions()
Resets all expansions to the center points of the variable domains and constructs a new tree of reduc...
std::string moduleName() const
void setStrategy(const std::initializer_list< BackendLink > &backends)
A base class for all kind of theory solving methods.
carl::mpl_variant_of< VariableTypes >::type VariableType
Variant type for all variables.
QuantifierType type(const std::pair< QuantifierType, std::vector< carl::Variable >> &p)
Class to create the formulas for axioms.
carl::FormulaSet< Poly > FormulaSetT
carl::Formula< Poly > FormulaT
const settings::Settings & Settings()
carl::Model< Rational, Poly > Model
carl::Interval< Rational > RationalInterval
carl::MultivariatePolynomial< Rational > Poly
Answer
An enum with the possible answers a Module can give.
std::vector< std::atomic_bool * > Conditionals
A vector of atomic bool pointers.
Represents the quotients and remainders of a variable in a positional notation to the basis Settings:...
bool mChangedBounds
Flag that indicates whether the variable bounds changed since last check call.
const carl::Variable mRationalization
Original variable to which this expansion is dedicated to and its discrete substitute.
std::vector< carl::Variable > mRemainders
const carl::Variable mDiscretization
DomainSize mMaximalDomainSize
Size of the maximal domain.
Expansion(const carl::Variable &rationalization)
Rational mNucleus
Center point of the domain where the search starts.
std::vector< carl::Variable > mQuotients
Sequences of quotients and remainders used for the virtual positional notation.
RationalInterval mActiveDomain
RationalInterval mMaximalDomain
Maximal domain deduced from received constraints and the currently active domain.
std::vector< Purification * > mPurifications
Active purifications of monomials that contain the rationalization variable.
Linear arithmetic module to call for the linearized formula.
Represents the class of all original constraints with the same left hand side after a normalization.
std::unordered_set< carl::Relation > mRelations
Relations of constraints with the same left hand side.
Linearization(const Poly &normalization, Poly &&linearization, std::vector< Purification * > &&purifications, bool hasRealVariables)
const std::vector< Purification * > mPurifications
Purifications of the original nonlinear monomials.
const Poly mNormalization
Normalization of the original constraint to which this linearization is dedicated to.
const bool mHasRealVariables
Flag that indicates whether the original constraint contains real variables.
const Poly mLinearization
Represents the substitution variables of a nonlinear monomial in a positional notation to the basis S...
bool mActive
Flag that indicates whether this purification is used for linearization.
size_t mUsage
Number of active constraints in which the monomial is included.
std::vector< carl::Variable > mSubstitutions
Variable sequence used for the virtual positional notation.
carl::Variable mReduction
Variable that is eliminated from the monomial during reduction.