SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
DefaultTwo.h
Go to the documentation of this file.
1 #pragma once
2 
15 
16 namespace smtrat {
17 
18 /**
19  * The default SMT-RAT strategy.
20  *
21  * For QF_NRA, MCSAT is used. For all other logics (QF_LRA, QF_LIRA, QF_NIRA, QF_NIA, QF_LIA), the classical SMT framework is employed.
22  *
23  * @author
24  * @since
25  * @version
26  *
27  */
28 class DefaultTwo: public Manager {
29  static bool condition_nira( carl::Condition _condition ) {
30  return ((carl::PROP_CONTAINS_NONLINEAR_POLYNOMIAL <= _condition) && (carl::PROP_CONTAINS_INTEGER_VALUED_VARS <= _condition));
31  }
32 
33  static bool condition_nra( carl::Condition _condition ) {
34  return ((carl::PROP_CONTAINS_NONLINEAR_POLYNOMIAL <= _condition) && !(carl::PROP_CONTAINS_INTEGER_VALUED_VARS <= _condition));
35  }
36 
37  static bool condition_lira( carl::Condition _condition ) {
38  return (!(carl::PROP_CONTAINS_NONLINEAR_POLYNOMIAL <= _condition) && (carl::PROP_CONTAINS_INTEGER_VALUED_VARS <= _condition));
39  }
40 
41  static bool condition_conjunction( carl::Condition _condition ) {
42  return ((carl::PROP_IS_LITERAL_CONJUNCTION <= _condition));
43  }
44 
45  static bool condition_noconjunction( carl::Condition _condition ) {
46  return (!(carl::PROP_IS_LITERAL_CONJUNCTION <= _condition));
47  }
48 
49  static bool condition_lra( carl::Condition _condition ) {
50  return (!(carl::PROP_CONTAINS_NONLINEAR_POLYNOMIAL <= _condition) && !(carl::PROP_CONTAINS_INTEGER_VALUED_VARS <= _condition));
51  }
52 
53  public:
54 
57  {
58  addBackend<FPPModule<FPPSettings1Old>>(
59  {
60  addBackend<IncWidthModule<IncWidthSettings1>>(
61  {
62  addBackend<IntBlastModule<IntBlastSettings2>>(
63  {
64  addBackend<SATModule<SATSettings1>>(
65  {
66  addBackend<LRAModule<LRASettings1>>(
67  {
68  addBackend<VSModule<VSSettings234>>(
69  {
70  addBackend<NewCoveringModule<NewCoveringSettings2>>({
71  addBackend<NewCADModule<NewCADSettingsFOS>>()
72  })
73  })
74  })
75  })
76  })
77  })
78  }).condition( &condition_nira ),
79  addBackend<FPPModule<FPPSettings1Old>>(
80  {
81  addBackend<SATModule<SATSettingsMCSATFMICPVSOCNewOC>>()
82  }).condition( &condition_nra ),
83  addBackend<FPPModule<FPPSettings1Old>>(
84  {
85  addBackend<SATModule<SATSettings1>>(
86  {
87  addBackend<CubeLIAModule<CubeLIASettings1>>(
88  {
89  addBackend<LRAModule<LRASettings1>>()
90  })
91  }).condition( &condition_conjunction ),
92  addBackend<SATModule<SATSettings1>>(
93  {
94  addBackend<LRAModule<LRASettings1>>()
95  }).condition( &condition_noconjunction )
96  }).condition( &condition_lira ),
97  addBackend<FPPModule<FPPSettings1Old>>(
98  {
99  addBackend<SATModule<SATSettings1>>(
100  {
101  addBackend<LRAModule<LRASettings1>>()
102  })
103  }).condition( &condition_lra )
104  });
105  }
106 };
107 
108 } // namespace smtrat
The default SMT-RAT strategy.
Definition: DefaultTwo.h:28
static bool condition_lra(carl::Condition _condition)
Definition: DefaultTwo.h:49
static bool condition_lira(carl::Condition _condition)
Definition: DefaultTwo.h:37
static bool condition_nira(carl::Condition _condition)
Definition: DefaultTwo.h:29
static bool condition_noconjunction(carl::Condition _condition)
Definition: DefaultTwo.h:45
static bool condition_nra(carl::Condition _condition)
Definition: DefaultTwo.h:33
static bool condition_conjunction(carl::Condition _condition)
Definition: DefaultTwo.h:41
Base class for solvers.
Definition: Manager.h:34
void setStrategy(const std::initializer_list< BackendLink > &backends)
Definition: Manager.h:385
Class to create the formulas for axioms.