10 #include "dreal/solver/config.h" 12 #include "dreal/util/optional.h" 13 #include "dreal/util/predicate_abstractor.h" 14 #include "dreal/util/scoped_unordered_map.h" 15 #include "dreal/util/scoped_unordered_set.h" 16 #include "dreal/util/tseitin_cnfizer.h" 22 using Literal = std::pair<Variable, bool>;
25 using Model = std::pair<std::vector<Literal>, std::vector<Literal>>;
55 void AddFormulas(
const std::vector<Formula>& formulas);
73 return predicate_abstractor_[var];
81 void AddClause(
const Formula& f);
86 void AddClauses(
const std::vector<Formula>& formulas);
91 void MakeSatVar(
const Variable& var);
97 void AddLiteral(
const Formula& f);
100 void DoAddClause(
const Formula& f);
105 PicoSAT*
const sat_{};
124 bool has_picosat_pop_used_{
false};
void AddFormula(const Formula &f)
Adds a formula f to the solver.
Definition: sat_solver.cc:39
void AddFormulas(const std::vector< Formula > &formulas)
Adds formulas formulas to the solver.
Definition: sat_solver.cc:52
Sum type of symbolic::Expression and symbolic::Formula.
Definition: api.cc:9
optional< Model > CheckSat()
Checks the satisfiability of the current configuration.
Definition: sat_solver.cc:105
Represents a symbolic variable.
Definition: symbolic_variable.h:16
SatSolver & operator=(const SatSolver &)=delete
Deleted copy-assignment operator.
Transforms a symbolic formula f into an equi-satisfiable CNF formula by introducing extra Boolean var...
Definition: tseitin_cnfizer.h:13
Definition: predicate_abstractor.h:11
void AddLearnedClause(const std::set< Formula > &formulas)
Given a formulas = {f₁, ..., fₙ}, adds a clause (¬f₁ ∨ ...
Definition: sat_solver.cc:58
This is the header file that we consolidate Drake's symbolic classes and expose them inside of dreal ...
SatSolver(const Config &config)
Constructs a SatSolver.
Definition: sat_solver.cc:18
Definition: sat_solver.h:20