SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
ESModule.h
Go to the documentation of this file.
1 /**
2  * A module, which iteratively finds boolean and arithmetic substitutions and applies them to all formulas
3  * which are connected to this substitution by a conjunction.
4  *
5  * Supports optimization.
6  *
7  * @file ESModule.h
8  * @author Florian Corzilius <corzilius@cs.rwth-aachen.de>
9  *
10  * @version 2015-09-09
11  * Created on 2015-09-09.
12  */
13 
14 #pragma once
15 
16 #include <smtrat-solver/PModule.h>
17 #include "ESSettings.h"
18 namespace smtrat
19 {
20  template<typename Settings>
21  class ESModule : public PModule
22  {
23  private:
24  // Members.
25  ///
26  std::unordered_map<FormulaT, bool> mBoolSubs;
27  ///
28  std::map<carl::Variable,Poly> mArithSubs;
29 
30  public:
32  ESModule( const ModuleInput* _formula, Conditionals& _conditionals, Manager* _manager = NULL );
33 
35 
36  // Main interfaces.
37 
38  /**
39  * Updates the current assignment into the model.
40  * Note, that this is a unique but possibly symbolic assignment maybe containing newly introduced variables.
41  */
42  void updateModel() const;
43 
44  /**
45  * Checks the received formula for consistency.
46  * @return SAT, if the received formula is satisfiable;
47  * UNSAT, if the received formula is not satisfiable;
48  * Unknown, otherwise.
49  */
51 
52  private:
53  /**
54  * Eliminates all equation forming a substitution of the form x = p with p not containing x.
55  */
56  FormulaT elimSubstitutions( const FormulaT& _formula, bool _elimSubstitutions = false, bool _outermost = false );
57 
58  };
59 }
All preprocessing modules shall derive from this module, that is modules, which simplify their receiv...
Settings SettingsType
Definition: ESModule.h:31
std::unordered_map< FormulaT, bool > mBoolSubs
Definition: ESModule.h:26
void updateModel() const
Updates the current assignment into the model.
std::map< carl::Variable, Poly > mArithSubs
Definition: ESModule.h:28
Answer checkCore()
Checks the received formula for consistency.
FormulaT elimSubstitutions(const FormulaT &_formula, bool _elimSubstitutions=false, bool _outermost=false)
Eliminates all equation forming a substitution of the form x = p with p not containing x.
ESModule(const ModuleInput *_formula, Conditionals &_conditionals, Manager *_manager=NULL)
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