SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
CubeLIAModule.h
Go to the documentation of this file.
1 /**
2  * @file CubeLIAModule.h
3  * @author YOUR NAME <YOUR EMAIL ADDRESS>
4  *
5  * @version 2015-11-24
6  * Created on 2015-11-24.
7  */
8 
9 #pragma once
10 
11 #include <smtrat-solver/Module.h>
12 #include "CubeLIASettings.h"
13 #include "../LRAModule/LRAModule.h"
14 
15 namespace smtrat
16 {
17  template<typename Settings>
18  class CubeLIAModule : public Module
19  {
20  private:
21 
22  struct Cubification
23  {
26  std::size_t mUsages;
27 
28  Cubification() = delete;
29 
30  Cubification( const FormulaT& _cubification, ModuleInput::iterator _position ):
31  mCubification(_cubification),
32  mPosition(_position),
33  mUsages(1)
34  {}
35  };
36  // Members.
37  mutable bool mModelUpdated;
38  std::map<carl::Variable,Poly> mIntToRealVarMap;
39  std::map<carl::Variable,carl::Variable> mRealToIntVarMap;
40  carl::FastMap<FormulaT,Cubification> mCubifications;
42  std::vector<std::atomic_bool*> mLRAFoundAnswer;
44  public:
46  std::string moduleName() const {
47  return SettingsType::moduleName;
48  }
49  CubeLIAModule(const ModuleInput* _formula, Conditionals& _conditionals, Manager* _manager = nullptr);
50 
52 
53  // Main interfaces.
54 
55  /**
56  * The module has to take the given sub-formula of the received formula into account.
57  *
58  * @param _subformula The sub-formula to take additionally into account.
59  * @return false, if it can be easily decided that this sub-formula causes a conflict with
60  * the already considered sub-formulas;
61  * true, otherwise.
62  */
63  bool addCore( ModuleInput::const_iterator _subformula );
64 
65  /**
66  * Removes the subformula of the received formula at the given position to the considered ones of this module.
67  * Note that this includes every stored calculation which depended on this subformula, but should keep the other
68  * stored calculation, if possible, untouched.
69  *
70  * @param _subformula The position of the subformula to remove.
71  */
73 
74  /**
75  * Updates the current assignment into the model.
76  * Note, that this is a unique but possibly symbolic assignment maybe containing newly introduced variables.
77  */
78  void updateModel() const;
79 
80  /**
81  * Checks the received formula for consistency.
82  * @return SAT, if the received formula is satisfiable;
83  * UNSAT, if the received formula is not satisfiable;
84  * Unknown, otherwise.
85  */
87 
88  };
89 }
void updateModel() const
Updates the current assignment into the model.
carl::FastMap< FormulaT, Cubification > mCubifications
Definition: CubeLIAModule.h:40
void removeCore(ModuleInput::const_iterator _subformula)
Removes the subformula of the received formula at the given position to the considered ones of this m...
ModuleInput * mLRAFormula
Definition: CubeLIAModule.h:41
bool addCore(ModuleInput::const_iterator _subformula)
The module has to take the given sub-formula of the received formula into account.
LRAModule< LRASettings1 > mLRA
Definition: CubeLIAModule.h:43
std::vector< std::atomic_bool * > mLRAFoundAnswer
Definition: CubeLIAModule.h:42
CubeLIAModule(const ModuleInput *_formula, Conditionals &_conditionals, Manager *_manager=nullptr)
Answer checkCore()
Checks the received formula for consistency.
std::string moduleName() const
Definition: CubeLIAModule.h:46
std::map< carl::Variable, carl::Variable > mRealToIntVarMap
Definition: CubeLIAModule.h:39
std::map< carl::Variable, Poly > mIntToRealVarMap
Definition: CubeLIAModule.h:38
A module which performs the Simplex method on the linear part of it's received formula.
Definition: LRAModule.h:30
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
super::const_iterator const_iterator
Passing through the list::const_iterator.
Definition: ModuleInput.h:146
super::iterator iterator
Passing through the list::iterator.
Definition: ModuleInput.h:144
A base class for all kind of theory solving methods.
Definition: Module.h:70
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
Cubification(const FormulaT &_cubification, ModuleInput::iterator _position)
Definition: CubeLIAModule.h:30
ModuleInput::iterator mPosition
Definition: CubeLIAModule.h:25