21 template<
typename Settings>
41 return os <<
"(" << c.
r <<
"," << std::boolalpha << c.
strict <<
")";
51 return os << ep.
coeff;
61 std::vector<std::pair<FormulaT,FormulaT>>
mLemmas;
65 std::transform(edges.begin(), edges.end(), std::back_inserter(res), [](
const Edge& edge){ return edge->constraint; });
68 std::vector<Vertex>
collectAdjacent(
const std::vector<Vertex>& vertices,
const std::vector<Edge>& edges) {
69 std::vector<Vertex> res;
70 auto curVertex = vertices.begin();
71 for (
const auto& edge: edges) {
73 if (curVertex == vertices.end()) curVertex = vertices.begin();
74 for (
const auto& v: edge.out()) {
75 if (v == *curVertex)
continue;
86 bool operator()(
const FHG& graph,
const std::vector<Vertex>& vertices,
const std::vector<Edge>& edges) {
88 for (
const auto& edge: edges) sum += edge->coeff;
90 if (carl::is_zero(sum.
r)) {
102 mLemmas.emplace_back(lemma, origin);
104 for (std::size_t i = 1; i < vertices.size(); i++) {
105 const auto& a = graph[vertices[i-1]];
106 const auto& b = graph[vertices[i]];
109 mLemmas.emplace_back(lemma, origin);
112 }
else if (sum.
r > 0) {
114 }
else if (sum.
r < 0) {
All preprocessing modules shall derive from this module, that is modules, which simplify their receiv...
This class implements a forward hypergraph.
std::size_t Vertex
Internal type of a vertex.
bool isSuitable(const ConstraintT &c, TermT &src, std::vector< TermT > &dest, Coefficient &coeff)
ICEModule(const ModuleInput *_formula, Conditionals &_conditionals, Manager *_manager=nullptr)
void removeFormula(const FormulaT &f)
bool is_zero(const TermT &t) const
bool isSemiPositive(const TermT &t) const
vb::VariableBounds< FormulaT > mBounds
bool addCore(ModuleInput::const_iterator _subformula)
The module has to take the given sub-formula of the received formula into account.
void addFormula(const FormulaT &f)
Answer checkCore()
Checks the received formula for consistency.
void removeCore(ModuleInput::const_iterator _subformula)
Removes the subformula of the received formula at the given position to the considered ones of this m...
Answer processConstraints()
std::set< FormulaT > mOtherFormulas
std::map< FormulaT, ConstraintT > mConstraints
bool isSemiNegative(const TermT &t) const
const RationalInterval & getInterval(const carl::Variable &_var) const
Creates an interval corresponding to the variable bounds of the given variable.
Class to create the formulas for axioms.
carl::FormulaSet< Poly > FormulaSetT
carl::Term< Rational > TermT
carl::Formula< Poly > FormulaT
const settings::Settings & Settings()
carl::MultivariatePolynomial< Rational > Poly
Answer
An enum with the possible answers a Module can give.
std::vector< std::atomic_bool * > Conditionals
A vector of atomic bool pointers.
carl::Constraint< Poly > ConstraintT
carl::Formulas< Poly > FormulasT
#define SMTRAT_LOG_DEBUG(channel, msg)
Internal type of an edge.
friend std::ostream & operator<<(std::ostream &os, const Coefficient &c)
Coefficient & operator+=(const Coefficient &c)
Coefficient & operator=(const Coefficient &c)
Coefficient(Coefficient &&c)
Coefficient(const Coefficient &c)
FormulaSetT mInfeasibleSubset
FormulaT buildFormula(const std::vector< Edge > &edges) const
bool operator()(const FHG &graph, const std::vector< Vertex > &vertices, const std::vector< Edge > &edges)
Is called whenever a cycle is found.
std::vector< std::pair< FormulaT, FormulaT > > mLemmas
std::vector< Vertex > collectAdjacent(const std::vector< Vertex > &vertices, const std::vector< Edge > &edges)
typename FHG::Vertex Vertex
friend std::ostream & operator<<(std::ostream &os, const EdgeProperty &ep)
EdgeProperty(const Coefficient &c, const FormulaT &con)