18 #include <carl-common/memory/IDPool.h>
23 template<
class Settings>
31 typedef std::vector<std::pair<carl::Variable,carl::Variable>>
VarPairVector;
63 #ifdef SMTRAT_DEVOPTION_Statistics
71 return SettingsType::moduleName;
99 typedef std::pair<vs::Substitution, std::list< vs::State* >>
ChildrenGroup;
182 std::vector<FormulaT>
getReasonsAsVector(
const carl::PointerSet<vs::Condition>& _conditions )
const;
233 void logConditions(
const vs::State& _state,
bool _assumption,
const std::string& _description,
bool _logAsDeduction =
true )
const;
242 void printAll(
const std::string& _init =
"", std::ostream& _out = std::cout )
const;
256 void printRanking(
const std::string& _init =
"", std::ostream& _out = std::cout )
const;
263 void printAnswer(
const std::string& _init =
"", std::ostream& _out = std::cout )
const;
A base class for all kind of theory solving methods.
ModuleStatistics & mStatistics
Answer checkCore()
Checks the received formula for consistency.
void checkAnswer() const
Checks the correctness of the symbolic assignment given by the path from the root state to the satisf...
std::string moduleName() const
static void allMinimumCoveringSets(const vs::ConditionSetSetSet &_conflictSets, vs::ConditionSetSet &_minCovSets)
Finds all minimum covering sets of a vector of sets of sets.
VarPairVector mVariableVector
Stores for each depth in the state tree (hence, for the variable eliminated in that state) a variable...
void removeStatesFromRanking(vs::State &_state)
Removes a state and its successors from the ranking.
void addStatesToRanking(vs::State *_state)
Inserts a state and all its successors in the ranking.
std::pair< vs::Substitution, std::list< vs::State * > > ChildrenGroup
A pair of a substitution and the states which belong to this substitution.
void propagateNewConditions(vs::State *_currentState)
Applies the substitution of the given state to all conditions, which were recently added to it.
void printFormulaConditionMap(const std::string &_init="", std::ostream &_out=std::cout) const
Prints the history to the output stream.
std::map< FormulaT, const vs::Condition * > FormulaConditionMap
A map from constraints represented by carl::formulas to vs::conditions.
bool mLastCheckFull
A flag, which is true if the last check was a full one.
vs::ValuationMap mRanking
The order for all states, in which they shall be processed. The first state in this map is processed ...
void removeCore(ModuleInput::const_iterator)
void printRanking(const std::string &_init="", std::ostream &_out=std::cout) const
Prints the history to the output stream.
void addStateToRanking(vs::State *_state)
Inserts a state in the ranking.
void insertTooHighDegreeStatesInRanking(vs::State *_state)
Inserts all states with too high degree conditions being the given state or any of its successors in ...
size_t mIDCounter
For the allocation of unique ids for the states.
std::vector< FormulaT > getReasonsAsVector(const carl::PointerSet< vs::Condition > &_conditions) const
bool checkRanking() const
void logConditions(const vs::State &_state, bool _assumption, const std::string &_description, bool _logAsDeduction=true) const
Checks whether the set of conditions is is consistent/inconsistent.
std::vector< std::pair< carl::Variable, carl::Variable > > VarPairVector
A vector of carl::variable pairs.
bool mConditionsChanged
A flag being true, if a condition in the root state has been changed after the last consistency check...
bool mInconsistentConstraintAdded
A flag being true, if it is known that a constraint has been added to the root state,...
Answer runBackendSolvers(vs::State *_state)
Run the backend solvers on the conditions of the given state.
FormulaSetT getReasons(const carl::PointerSet< vs::Condition > &_conditions) const
bool adaptPassedFormula(const vs::State &_state, FormulaConditionMap &_formulaCondMap)
Adapts the passed formula according to the conditions of the currently considered state.
void printAll(const std::string &_init="", std::ostream &_out=std::cout) const
Prints the history to the output stream.
bool substituteAll(vs::State *_currentState, vs::ConditionList &_conditions)
Applies the substitution of _currentState to the given conditions.
void increaseIDCounter()
Increase the counter for id allocation.
VSModule(const ModuleInput *, Conditionals &, Manager *const =NULL)
carl::Variables mAllVariables
carl::IDPool * mpConditionIdAllocator
Id allocator for the conditions.
bool removeStateFromRanking(vs::State &_state)
Removes a state from the ranking.
void updateInfeasibleSubset(bool _includeInconsistentTestCandidates=false)
bool addCore(ModuleInput::const_iterator)
void printAnswer(const std::string &_init="", std::ostream &_out=std::cout) const
Prints the answer if existent.
std::vector< ChildrenGroup > ChildrenGroups
A vector of pairs of a substitution and the states which belong to this substitution.
FormulaConditionMap mFormulaConditionMap
void updateModel() const
Updates the model, if the solver has detected the consistency of the received formula,...
size_t mLazyCheckThreshold
void eliminate(vs::State *_currentState, const carl::Variable &_eliminationVar, const vs::Condition *_condition)
Eliminates the given variable by finding test candidates of the constraint of the given condition.
std::set< ConditionSetSet > ConditionSetSetSet
std::list< const Condition * > ConditionList
std::set< carl::PointerSet< Condition > > ConditionSetSet
std::map< UnsignedTriple, vs::State *, unsignedTripleCmp > ValuationMap
Class to create the formulas for axioms.
carl::FormulaSet< Poly > FormulaSetT
const settings::Settings & Settings()
Answer
An enum with the possible answers a Module can give.
std::vector< std::atomic_bool * > Conditionals
A vector of atomic bool pointers.