3 #include "../QEQuery.h"
5 #include "../util/VariableIndex.h"
6 #include "../util/Matrix.h"
7 #include "../util/EqualitySubstitution.h"
19 using Row = std::vector<Matrix::RowEntry>;
23 auto it_a = a.begin(), it_b = b.begin();
24 auto end_a = a.end(), end_b = b.end();
25 while (it_a != end_a && it_b != end_b) {
26 if (it_a->col_index != it_b->col_index)
27 return it_a->col_index < it_b->col_index;
28 if (it_a->value != it_b->value)
29 return it_a->value < it_b->value;
33 return (it_b != end_b);
53 qfree.type() == carl::FormulaType::CONSTRAINT ||
54 qfree.is_real_constraint_conjunction()
74 return ((row.front().col_index <=
delta_column()) && (row.front().value > 0));
88 for (std::size_t i = 0; ; ++i) {
Node bounded_elimination(Node &parent)
Eliminates the chosen column in parent using the next eliminator in parent.
ColIndex m_first_parameter_col
std::vector< Node > m_nodes
FormulaT eliminate_quantifiers()
void write_matrix_to_redlog(const Matrix &m, const std::string &filename) const
ColIndex constant_column() const
bool is_trivial(const Row &row) const
bool is_positive_combination(const Row &row)
bool fm_elimination(Node &parent)
Eliminates the chosen column in parent using Fourier-Motzkin, but discards rows with 0 coeff.
void collect_constraint(const Row &row)
truncates the given row to not contain any "origin" information and inserts the result into the set o...
std::vector< Node > split_into_independent_nodes(const Node &n) const
Splits the given node into multiple nodes that are independent in the following sense:
Matrix::RowIndex RowIndex
Matrix::ColIndex ColIndex
Node unbounded_elimination(Node &parent)
Eliminates the chosen column in parent by dropping all rows with non-zero entry in that column.
ColIndex delta_column() const
FormulaSetT m_found_conjuncts
void write_matrix_to_ine(const Matrix &m, const std::string &filename) const
writes the given qe problem as a .ine file as used in CDD lib.
FMplexQE(const FormulaT &qfree, const QEQuery &quantifiers)
qe::util::VariableIndex m_var_idx
Matrix build_initial_matrix(const FormulasT &constraints)
Constructs a matrix from the given constraints.
ColIndex origin_column(RowIndex row) const
FormulaT constraint_from_row(const Row &row) const
std::vector< Matrix::RowEntry > Row
std::set< Row, cmp_row > m_found_rows
void build_initial_systems()
Constructs the starting nodes from m_query and m_formula as follows:
bool is_conflict(const Row &row) const
std::vector< carl::Variable > gather_elimination_variables() const
std::vector< std::pair< QuantifierType, std::vector< carl::Variable > >> QEQuery
carl::FormulaSet< Poly > FormulaSetT
carl::Formula< Poly > FormulaT
carl::Formulas< Poly > FormulasT
bool operator()(const Row &a, const Row &b) const