9#ifndef DLINEAR_ENABLED_QSOPTEX
10#error QSopt_ex is not enabled. Please enable it by adding "--//tools:enable_qsoptex" to the bazel command.
15#include "dlinear/libs/libqsopt_ex.h"
16#include "dlinear/solver/LpRowSense.h"
17#include "dlinear/solver/TheorySolver.h"
18#include "dlinear/symbolic/literal.h"
19#include "dlinear/symbolic/symbolic.h"
20#include "dlinear/util/Box.h"
24extern "C" void QsoptexCheckSatPartialSolution(mpq_QSdata
const *prob, mpq_t *x,
const mpq_t infeas,
const mpq_t delta,
33 const std::string &class_name =
"QsoptexTheorySolver");
96 void SetLinearObjective(
const Expression &expr);
97 void ClearLinearObjective();
109void QsoptexCheckSatPartialSolution(mpq_QSdata
const *prob, mpq_t *x,
const mpq_t infeas,
const mpq_t delta,
Collection of variables with associated intervals.
Predicate abstraction is a method to convert a first-order logic formula into a Boolean formula.
QSopt_ex is an exact LP solver written in C.
void EnableQsxVarBound()
Set the bounds of the variables in the LP solver.
std::vector< LpRowSense > qsx_sense_
Sense of the constraints.
void AddLiterals() override
Add a vector of literals to the theory solver.
void DisableQsxRows()
Disable all disabled qsx rows from the LP solver.
void EnableQsxRow(int qsx_row)
Enable the qsx_row row for the LP solver.
qsopt_ex::MpqArray x_
Solution vector.
virtual void EnableQsxRow(int qsx_row, bool truth)=0
Enable the qsx_row row for the LP solver.
void Consolidate(const Box &box) override
Consolidate the solver.
void UpdateModelSolution() override
Update the model with the solution obtained from the LP solver.
void SetQsxVarCoeff(int qsx_row, const Variable &var, const mpq_class &value)
Set the coefficient of var on the qsx_row row.
void UpdateModelBounds() override
Update each variable in the model with the bounds passed to the theory solver.
qsopt_ex::MpqArray ray_
Ray of the last infeasible solution.
void UpdateExplanation(LiteralSet &explanation) override
Use the result from the theory solver to update the explanation with the conflict that has been detec...
void SetRowCoeff(const Formula &formula, int qsx_row)
Parse a formula and set the correct coefficients of decisional variables in the qsx_row row.
void SetQsxVarObjCoeff(const Variable &var, const mpq_class &value)
Set the objective coefficient of var to value.
void AddVariable(const Variable &var) override
Add a variable (column) to the theory solver.
std::vector< mpq_class > qsx_rhs_
Right-hand side of the constraints.
Base class for theory solvers.
const PredicateAbstractor & predicate_abstractor() const
Get read-only access to the predicate abstractor of the TheorySolver.
Represents a symbolic form of an expression.
Represents a symbolic variable.
A wrapper around an array of mpq_t elements.
Global namespace for the dlinear library.
std::set< Literal > LiteralSet
A set of literals.