17 #ifdef SMTRAT_STRAT_PARALLEL_MODE
66 #ifdef SMTRAT_STRAT_PARALLEL_MODE
70 size_t mNumberOfBranches;
72 unsigned mNumberOfCores;
76 mutable std::mutex mBackendsMutex;
125 bool add(
const FormulaT& _subformula,
bool _containsUnknownConstraints =
true );
161 void pop(
size_t _levels );
224 std::vector<FormulaT>
lemmas();
385 void setStrategy(
const std::initializer_list<BackendLink>& backends) {
395 template<
typename Module>
399 template<
typename Module>
413 #ifdef SMTRAT_STRAT_PARALLEL_MODE
414 std::lock_guard<std::mutex> lock( mBackendsMutex );
418 std::vector<Module*>
result = iter->second;
422 #ifdef SMTRAT_STRAT_PARALLEL_MODE
430 return mRunsParallel;
443 std::vector<Module*>
getBackends(
Module* _requiredBy, std::atomic_bool* _foundAnswer );
445 #ifdef SMTRAT_STRAT_PARALLEL_MODE
453 Answer runBackends(
const std::vector<Module*>& modules,
bool final,
bool full, carl::Variable objective);
bool mBackendsUptodate
a Boolean showing whether the manager has received new constraint after the last consistency check
void push()
Pushes a backtrack point to the stack of backtrack points.
bool inform(const FormulaT &_constraint)
Informs the solver about a constraint.
void printStrategyGraph(std::ostream &_out=std::cout) const
Prints the strategy of the solver maintained by this manager.
const std::vector< FormulaSetT > & infeasibleSubsets() const
ModuleInput * mpPassedFormula
the constraints so far passed to the primary backend
void setObjectiveVariable(carl::Variable var)
void deinform(const FormulaT &_constraint)
The inverse of informing about a constraint.
smtrat::Conditionals mPrimaryBackendFoundAnswer
a vector of flags, which indicate that an answer has been found of an antecessor module of the primar...
Module * mpPrimaryBackend
the primary backends
ModuleInput::iterator remove(const FormulaT &_subformula)
Temporarily added: (TODO: Discuss with Gereon) Removes the given formula in the conjunction of formul...
std::vector< Module * > mGeneratedModules
all generated instances of modules
ModuleInput::iterator formulaBegin()
std::set< FormulaT > mInformationRelevantFormula
List of formula which are relevant for certain tasks.
ModuleInput::iterator remove(ModuleInput::iterator _subformula)
Removes the formula at the given position in the conjunction of formulas, which will be considered fo...
std::vector< Module * > getBackends(Module *_requiredBy, std::atomic_bool *_foundAnswer)
Get the backends to call for the given problem instance required by the given module.
bool isLemmaLevel(LemmaLevel level)
Checks if current lemma level is greater or equal to given level.
void printInfeasibleSubset(std::ostream &_out=std::cout) const
Prints the first found infeasible subset of the set of received formulas.
StrategyGraph mStrategyGraph
primary strategy
const carl::Variable & objectiveVariable() const
void addInformationRelevantFormula(const FormulaT &formula)
Adds formula to InformationRelevantFormula.
void clearInformationRelevantFormula()
Deletes all InformationRelevantFormula.
std::map< const Module *const, std::vector< Module * > > mBackendsOfModules
a mapping of each module to its backends
std::list< std::vector< carl::Variable > > getModelEqualities() const
Determines variables assigned by the currently found satisfying assignment to an equal value in their...
void setStrategy(const BackendLink &backend)
std::vector< ModuleInput::iterator > mBacktrackPoints
Contains the backtrack points, that are iterators to the last formula to be kept when backtracking to...
carl::Variable mObjectiveVariable
objective variable
std::ostream mDebugOutputChannel
channel to write debug output
carl::Condition mPropositions
The propositions of the passed formula.
void setStrategy(const std::initializer_list< BackendLink > &backends)
void printAssignment() const
Prints the currently found assignment of variables occurring in the so far added formulas to values o...
LemmaLevel mLemmaLevel
Level of lemma generation.
~Manager()
Destructs a manager.
BackendLink addBackend(const BackendLink &backend)
bool pop()
Pops a backtrack point from the stack of backtrack points.
const std::vector< Model > & allModels() const
bool add(const FormulaT &_subformula, bool _containsUnknownConstraints=true)
Adds the given formula to the conjunction of formulas, which will be considered for the next satisfia...
void setLemmaLevel(LemmaLevel level)
Sets the current level for lemma generation.
carl::Logic mLogic
the logic this solver considers
const std::vector< Module * > & getAllGeneratedModules() const
std::vector< FormulaT > lemmas()
Returns the lemmas/tautologies which were made during the last solving provoked by check().
std::vector< Module * > getAllBackends(Module *_module) const
Gets all backends so far instantiated according the strategy and all previous enquiries of the given ...
std::ostream & rDebugOutputChannel()
BackendLink & addEdge(std::size_t from, std::size_t to)
const ModuleInput & formula() const
void printAllAssignments(std::ostream &_out=std::cout)
Prints all assignments of variables occurring in the so far added formulas to values of their domains...
void printBackTrackStack(std::ostream &_out=std::cout) const
Prints the stack of backtrack points.
std::pair< bool, FormulaT > getInputSimplified()
Answer check(bool _full=true)
Checks the so far added formulas for satisfiability.
ModuleInput::iterator formulaEnd()
BackendLink addBackend(const std::initializer_list< BackendLink > &backends={})
Manager()
Constructs a manager.
const Model & model() const
const std::set< FormulaT > & getInformationRelevantFormulas()
Gets all InformationRelevantFormulas.
A base class for all kind of theory solving methods.
thread_priority threadPriority() const
void setThreadPriority(thread_priority _threadPriority)
Sets the priority of this module to get a thread for running its check procedure.
virtual void updateAllModels()
Updates all satisfying models, if the solver has detected the consistency of the received formula,...
void printAllModels(std::ostream &_out=std::cout)
Prints all assignments of this module satisfying its received formula if it satisfiable and this modu...
const std::vector< Model > & allModels() const
std::size_t numberOfBranches() const
std::size_t addRoot(const std::initializer_list< BackendLink > &backends)
BackendLink & addEdge(std::size_t from, std::size_t to)
BackendLink addBackend(const std::initializer_list< BackendLink > &backends)
Class to create the formulas for axioms.
carl::Formula< Poly > FormulaT
carl::Model< Rational, Poly > Model
Answer
An enum with the possible answers a Module can give.
std::vector< std::atomic_bool * > Conditionals
A vector of atomic bool pointers.
std::pair< std::size_t, std::size_t > thread_priority
#define SMTRAT_LOG_INFO(channel, msg)