SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
BEModule.h
Go to the documentation of this file.
1 /**
2  * A module, which searches for bounds of arithmetic variables and polynomials.
3  *
4  * @file BEModule.h
5  * @author Florian Corzilius <corzilius@cs.rwth-aachen.de>
6  *
7  * @version 2015-09-09
8  * Created on 2015-09-09.
9  */
10 
11 #pragma once
12 
13 #include <smtrat-solver/PModule.h>
14 #include "BESettings.h"
15 #include <carl-formula/formula/functions/ConstraintBounds.h>
16 
17 namespace smtrat
18 {
19  template<typename Settings>
20  class BEModule : public PModule
21  {
22  private:
23  // Members.
24  ///
25 
26  using Choice = std::tuple<carl::Variable,FormulaT>;
27  std::map<Choice, carl::Variable> mReplacements;
28 
29  public:
31  std::string moduleName() const {
32  return SettingsType::moduleName;
33  }
34  BEModule( const ModuleInput* _formula, Conditionals& _conditionals, Manager* _manager = NULL );
35 
37 
38  // Main interfaces.
39 
40  /**
41  * Checks the received formula for consistency.
42  * @return SAT, if the received formula is satisfiable;
43  * UNSAT, if the received formula is not satisfiable;
44  * Unknown, otherwise.
45  */
47 
48  private:
49  FormulaT extractBounds( const FormulaT& formula );
51 
52  void collectBounds(carl::ConstraintBounds<Poly>& cb, const FormulaT& formula, bool conjunction) const;
54  };
55 }
All preprocessing modules shall derive from this module, that is modules, which simplify their receiv...
std::tuple< carl::Variable, FormulaT > Choice
Definition: BEModule.h:26
BEModule(const ModuleInput *_formula, Conditionals &_conditionals, Manager *_manager=NULL)
std::map< Choice, carl::Variable > mReplacements
Definition: BEModule.h:27
FormulaT extractBounds(const FormulaT &formula)
FormulaT applyReplacements(const FormulaT &f) const
void collectBounds(carl::ConstraintBounds< Poly > &cb, const FormulaT &formula, bool conjunction) const
std::string moduleName() const
Definition: BEModule.h:31
Answer checkCore()
Checks the received formula for consistency.
Settings SettingsType
Definition: BEModule.h:30
std::function< FormulaT(FormulaT)> extractBoundsFunction
Definition: BEModule.h:50
Base class for solvers.
Definition: Manager.h:34
The input formula a module has to consider for it's satisfiability check.
Definition: ModuleInput.h:131
Class to create the formulas for axioms.
carl::Formula< Poly > FormulaT
Definition: types.h:37
const settings::Settings & Settings()
Definition: Settings.h:96
Answer
An enum with the possible answers a Module can give.
Definition: types.h:57
std::vector< std::atomic_bool * > Conditionals
A vector of atomic bool pointers.
Definition: types.h:17