48 #ifdef SMTRAT_DEVOPTION_Statistics
59 template<
class Settings>
141 std::shared_ptr<std::vector<FormulaT>>
origins;
214 return ca[w.
cref].mark() == 1;
257 assert(Settings::mc_sat);
264 SMTRAT_LOG_TRACE(
"smtrat.sat.lemma_lt",
"Doing comparison " << x <<
" < " << y <<
"?");
265 if (x == y)
return false;
276 SMTRAT_LOG_TRACE(
"smtrat.sat.lemma_lt",
"Both unassigned, using arbitrary order: " << (x < y));
280 SMTRAT_LOG_TRACE(
"smtrat.sat.lemma_lt", x <<
" unassigned but " << y <<
" assigned, hence true");
286 SMTRAT_LOG_TRACE(
"smtrat.sat.lemma_lt", x <<
" assigned but " << y <<
" unassigned, hence false");
290 if (x_value != y_value) {
294 assert(x_value == y_value);
296 SMTRAT_LOG_TRACE(
"smtrat.sat.lemma_lt",
"Level of " << x <<
": " << x_level);
298 SMTRAT_LOG_TRACE(
"smtrat.sat.lemma_lt",
"Level of " << y <<
": " << y_level);
299 SMTRAT_LOG_TRACE(
"smtrat.sat.lemma_lt",
"Comparing levels: " << (x_level > y_level));
300 return x_level > y_level;
397 _ca.
reloc( cr, _to );
399 _ca.
reloc( cr, _to );
634 #ifdef SMTRAT_DEVOPTION_Statistics
635 mcsat::MCSATStatistics& mMCSATStatistics = statistics_get<mcsat::MCSATStatistics>(
"SATModule_" + std::to_string(
id()) +
"_mcsat");
640 #ifdef SMTRAT_DEVOPTION_Statistics
642 SATModuleStatistics&
mStatistics = statistics_get<SATModuleStatistics>(
"SATModule_" + std::to_string(
id()));
648 std::size_t
operator() (
const std::vector<Minisat::Lit>& cl)
const {
649 return std::accumulate(cl.begin(), cl.end(),
static_cast<std::size_t
>(0),
650 [](std::size_t a,
Minisat::Lit b){ return a ^ static_cast<std::size_t>(b.x); }
660 bool contains(
const std::vector<Minisat::Lit>& cl)
const {
663 void insert(
const std::vector<Minisat::Lit>& cl) {
752 void print( std::ostream& _out = std::cout,
const std::string& _init =
"" )
const;
803 void printClause(
Minisat::CRef _clause,
bool _withAssignment =
false, std::ostream& _out = std::cout,
const std::string& _init =
"" )
const;
823 void printClauses(
const Minisat::vec<Minisat::CRef>& _clauses,
const std::string _name, std::ostream& _out = std::cout,
const std::string& _init =
"",
int = 0,
bool _withAssignment =
false,
bool _onlyNotSatisfied =
false )
const;
830 void printDecisions( std::ostream& _out = std::cout,
const std::string& _init =
"" )
const;
930 if (Settings::mc_sat) {
962 SMTRAT_LOG_DEBUG(
"smtrat.sat",
"Add theory conflict clause " << clause <<
" if new");
966 std::vector<Minisat::Lit> explanation_set;
967 for (
const auto& c: clause) {
969 explanation.
push(lit);
970 explanation_set.push_back(lit);
976 SMTRAT_LOG_DEBUG(
"smtrat.sat",
"Skipping duplicate clause " << explanation);
988 #ifdef DEBUG_SATMODULE
989 print(std::cout,
"###");
991 SMTRAT_LOG_DEBUG(
"smtrat.sat",
"Handling theory conflict explanation " << explanation);
993 if (std::holds_alternative<FormulaT>(explanation)) {
995 const auto& clause = std::get<FormulaT>(explanation);
999 const auto& chain = std::get<mcsat::ClauseChain>(explanation);
1000 if (Settings::mcsat_resolve_clause_chains) {
1008 for (
const auto& link : chain) {
1165 if (Settings::mc_sat) {
1169 if (reabstr.type() == carl::FormulaType::VARASSIGN) {
1170 SMTRAT_LOG_DEBUG(
"smtrat.sat",
"Converting " << x <<
" (" << reabstr <<
")...")
1171 const carl::Variable tvar = reabstr.variable_assignment().var();
1200 if (ptr1 ==
nullptr)
continue;
1201 assert(ptr2 !=
nullptr);
1202 if (ptr1->updateInfo * ptr2->updateInfo > 0) {
1203 SMTRAT_LOG_WARN(
"smtrat.sat.mcsat",
"Consistency error for " << ptr1->reabstraction <<
" / " << ptr2->reabstraction);
1206 assert(ptr1->updateInfo * ptr2->updateInfo <= 0);
1438 bool rescale =
false;
1451 if ((
activity[v] += inc) > 1e100) {
1459 for(
int i = 0; i <
nVars(); i++ )
1499 ca[
learnts[i]].activity() *= (float)1e-20;
1569 static double luby(
double y,
int x );
1594 return 1 << (
level( x ) & 31);
1621 if (Settings::mc_sat) {
1633 assert( _var <
vardata.size() );
1635 return vardata[_var].mTrailIndex;
1667 static inline double drand(
double& seed )
1670 int q = (int)(seed / 2147483647);
1671 seed -= (double)q * 2147483647;
1672 return seed / 2147483647;
1680 static inline int irand(
double& seed,
int size )
1682 return (
int)(
drand( seed ) * size);
1693 _formulaCNFInfoIter->second.mClauses.push_back(
clauses.
last() );
1695 assert( cfRet.second );
1696 cfRet.first->second.addOrigin( _original );
1706 _formula.type() == carl::FormulaType::CONSTRAINT ||
1707 _formula.type() == carl::FormulaType::VARCOMPARE ||
1708 _formula.type() == carl::FormulaType::VARASSIGN ||
1709 _formula.type() == carl::FormulaType::UEQ ||
Class to create a settings object for the SATModule.
void reloc(CRef &cr, ClauseAllocator &to)
const T & last(void) const
A base class for all kind of theory solving methods.
ModuleStatistics & mStatistics
const Model & model() const
virtual void addConstraintToInform(const FormulaT &_constraint)
Adds a constraint to the collection of constraints of this module, which are informed to a freshly ge...
Implements a module performing DPLL style SAT checking.
void print(std::ostream &_out=std::cout, const std::string &_init="") const
Prints everything.
bool remove_satisfied
Indicates whether possibly inefficient linear scan for satisfied clauses should be performed in 'simp...
std::map< Minisat::Var, FormulasT > VarLemmaMap
Maps the minisat variable to the formulas which influence its value.
Minisat::CRef propagateConsistently(bool _checkWithTheory=true)
Propagate and check the consistency of the constraints, whose abstraction literals have been assigned...
Minisat::vec< Minisat::Lit > analyze_stack
[Minisat related code]
std::set< std::vector< int > > ClauseSet
A set of vectors of integer representing a set of clauses.
size_t mNumberOfSatisfiedClauses
carl::FastMap< FormulaT, std::vector< Minisat::Lit > > ConstraintLiteralsMap
Maps the constraints occurring in the SAT module to their abstractions.
int level(Minisat::Var x) const
bool mFullAssignmentCheckedForConsistency
bool luby_restart
[Minisat related code]
void varBumpActivity(Minisat::Var v, double inc)
Increase a variable with the current 'bump' value.
static int irand(double &seed, int size)
int min_theory_level(Minisat::Var x) const
std::vector< signed > mChangedBooleans
Stores all Literals for which the abstraction information might be changed.
double random_var_freq
[Minisat related code]
void claDecayActivity()
Decay all clauses with the specified factor.
void newDecisionLevel()
Begins a new decision level.
Minisat::lbool bool_value(Minisat::Lit p) const
Minisat::lbool bool_value(Minisat::Var x) const
void printConstraintLiteralMap(std::ostream &_out=std::cout, const std::string &_init="") const
Prints the constraints to literal map.
std::vector< Minisat::Lit > mPropagationFreeDecisions
void addConstraintToInform_(const FormulaT &_formula)
carl::FastMap< Minisat::CRef, ClauseInformation > mClauseInformation
int64_t propagation_budget
-1 means no budget.
void cleanUpAfterOptimizing(const std::vector< Minisat::CRef > &_excludedAssignments)
void setPropBudget(int64_t x)
[Minisat related code]
Minisat::vec< Minisat::CRef > clauses
List of problem clauses.
bool mReceivedFormulaPurelyPropositional
Minisat::Lit getLiteral(const FormulaT &_formula) const
Minisat::lbool value(Minisat::Var x) const
void printClauseInformation(std::ostream &_out=std::cout, const std::string &_init="") const
Prints the clause information.
double maxActivity() const
uint64_t learnts_literals
Minisat::Var mTrueVar
Variable representing true.
int trailIndex(Minisat::Var _var) const
int simpDB_assigns
Number of top-level assignments since last execution of 'simplify()'.
void decrementTseitinShadowOccurrences(signed _var)
double learntsize_adjust_confl
[Minisat related code]
void printClause(const Minisat::vec< Minisat::Lit > &, bool _withAssignment=false, std::ostream &_out=std::cout, const std::string &_init="") const
Prints the clause resulting from the given vector of literals.
bool mComputeAllSAT
A flag, which is set to true, if all satisfying assignments should be computed.
Minisat::Lit createLiteral(const FormulaT &_formula, const FormulaT &_origin=FormulaT(carl::FormulaType::TRUE), bool _decisionRelevant=true)
Creates or simply returns the literal belonging to the formula being the first argument.
Minisat::vec< std::pair< Abstraction *, Abstraction * > > BooleanConstraintMap
Maps each Minisat variable to a pair of Abstractions, one contains the abstraction information of the...
void learnTheoryConflicts()
Adds the clauses representing all conflicts generated by all backends.
void insertVarOrder(Minisat::Var x)
Insert a variable in the decision order priority queue.
static double drand(double &seed)
void cancelAssignmentUntil(int level)
Revert the variables assignment until a given level (keeping all assignments at 'level')
typename Settings::VarScheduler VarScheduler
double learntsize_inc
The limit for learned clauses is multiplied with this factor each restart.(default 1....
double clause_decay
[Minisat related code]
void setPolarity(Minisat::Var v, bool b)
Declare which polarity the decision heuristic should use for a variable.
int theory_level(Minisat::Var x) const
void reduceDB()
reduceDB : () -> [void]
void resetVariableAssignment(Minisat::Var _var)
Minisat::lbool theoryValue(Minisat::Lit p) const
carl::Bitset mNonassumedTseitinVariable
Stores whether a given tseitin variable was not yet added to the assumptions, but represents a top-le...
void printFormulaCNFInfosMap(std::ostream &_out=std::cout, const std::string &_init="") const
Prints the formulas to clauses map.
std::unordered_map< int, std::unordered_set< Minisat::CRef > > mLiteralClausesMap
void decrementLearntSizeAdjustCnt()
[Minisat related code]
void removeUpperBoundOnMinimal()
bool ok
If FALSE, the constraints are already unsatisfiable. No part of the solver state may be used!
carl::Bitset mAssumedTseitinVariable
Stores whether a given tseitin variable was already added to the assumptions.
void printLiteralsActiveOccurrences(std::ostream &_out=std::cout, const std::string &_init="") const
Prints the literals' active occurrences in all clauses.
void garbageCollect()
[Minisat related code]
void checkGarbage(double gf)
[Minisat related code]
Minisat::vec< VarData > vardata
Stores reason and level for each variable.
Minisat::Var newVar(bool polarity=true, bool dvar=true, double _activity=0, bool insertIntoHeap=true)
Creates a new SAT variable in the solver.
void rebuildOrderHeap()
[Minisat related code]
bool rnd_pol
Use random polarities for branching heuristics.
Minisat::vec< char > polarity
The preferred polarity of each variable.
bool addClauseIfNew(const FormulasT &clause)
bool withinBudget() const
std::vector< LiteralClauses > mLiteralsClausesMap
void adaptPassedFormula(Abstraction &_abstr)
Adapts the passed formula according to the given abstraction information.
std::vector< signed > mChangedActivities
Stores all clauses in which the activities have been changed.
void adaptConflictEvaluation(size_t &_clauseEvaluation, Minisat::Lit _lit, bool _firstLiteral)
bool analyze(Minisat::CRef confl, Minisat::vec< Minisat::Lit > &out_learnt, int &out_btlevel)
analyze : (confl : Clause*) (out_learnt : vec<Lit>&) (out_btlevel : int&) -> [void]
Minisat::vec< Minisat::lbool > assigns
The current assignments.
Minisat::lbool value(Minisat::Lit p) const
Minisat::vec< char > seen
Each variable is prefixed by the method in which it is used, except 'seen' which is used in several p...
double progress_estimate
Set by 'search()'.
Minisat::vec< Minisat::CRef > learnts
List of learned clauses.
std::map< std::pair< size_t, size_t >, size_t > mCurrentTheoryConflictEvaluations
bool mAllActivitiesChanged
Is true, if we have to communicate all activities to the backends. (This might be the case after resc...
void removeLiteralOrigin(Minisat::Lit _litToRemove, const FormulaT &_origin)
double cla_inc
Amount to bump next clause with.
void updateCNFInfoCounter(typename FormulaCNFInfosMap::iterator _iter, const FormulaT &_origin, bool _increment)
uint64_t solves
[Minisat related code]
double garbage_frac
The fraction of wasted memory allowed before a garbage collection is triggered.
void printBooleanConstraintMap(std::ostream &_out=std::cout, const std::string &_init="") const
Prints the literal to constraint map.
void addXorClauses(const Minisat::vec< Minisat::Lit > &_literals, const Minisat::vec< Minisat::Lit > &_negLiterals, int _from, bool _numOfNegatedLitsEven, unsigned _type, Minisat::vec< Minisat::Lit > &_clause, const FormulaT &_original, typename FormulaCNFInfosMap::iterator _formulaCNFInfoIter)
void updateAllModels()
Updates all satisfying models, if the solver has detected the consistency of the received formula,...
mcsat::MCSATMixin< typename Settings::MCSATSettings > mMCSAT
carl::FastMap< FormulaT, CNFInfos > FormulaCNFInfosMap
Maps the clauses in the received formula to the corresponding Minisat clause.
void clearInterrupt()
Clear interrupt indicator flag.
Minisat::Lit addClauses(const FormulaT &_formula, unsigned _type, unsigned _depth=0, const FormulaT &_original=FormulaT(carl::FormulaType::TRUE))
bool locked(const Minisat::Clause &c)
void uncheckedEnqueue(Minisat::Lit p, Minisat::CRef from=Minisat::CRef_Undef)
Enqueue a literal.
Minisat::vec< Minisat::Lit > add_tmp
[Minisat related code]
Minisat::vec< Minisat::Lit > learnt_clause
For temporary usage.
Minisat::OccLists< Minisat::Lit, Minisat::vec< Minisat::Watcher >, WatcherDeleted > watches
'watches[lit]' is a list of constraints watching 'lit' (will go there if literal becomes true).
void updateModel(Model &model, bool only_relevant_variables=false) const
Updates the model, if the solver has detected the consistency of the received formula,...
double random_seed
[Minisat related code]
double var_inc
Amount to bump next variable with.
std::unordered_map< int, FormulaT > MinisatVarMap
Maps the Minisat variables to their corresponding boolean variable.
int64_t conflict_budget
-1 means no budget.
int verbosity
[Minisat related code]
double learntsize_adjust_inc
[Minisat related code]
std::vector< std::vector< Minisat::Lit > > ClauseVector
A vector of vectors of literals representing a vector of clauses.
UnorderedClauseLookup mUnorderedClauseLookup
std::vector< Minisat::vec< Minisat::Lit > > mCurrentTheoryConflicts
void cancelIncludingLiteral(Minisat::Lit lit)
bool rnd_init_act
Initialize variable activities with a small random value.
carl::FastMap< int, FormulaT > mTseitinVarFormulaMap
void updateModel() const
Updates the model, if the solver has detected the consistency of the received formula,...
void handleTheoryConflict(const mcsat::Explanation &explanation)
void printClause(Minisat::CRef _clause, bool _withAssignment=false, std::ostream &_out=std::cout, const std::string &_init="") const
Prints the clause at the given reference.
void removeClause(Minisat::CRef cr)
Detach and free a clause.
Minisat::ClauseAllocator ca
[Minisat related code]
void setDecisionVar(Minisat::Var v, bool b, bool insertIntoHeap=true)
Declare if a variable should be eligible for selection in the decision heuristic.
Minisat::lbool theoryValue(Minisat::Var x) const
bool asynch_interrupt
[Minisat related code]
bool addCore(ModuleInput::const_iterator)
The module has to take the given sub-formula of the received formula into account.
int learntsize_adjust_start_confl
[Minisat related code]
std::map< carl::Variable, std::vector< signed > > mFutureChangedBooleans
std::vector< int > mRelevantVariables
Stores Minisat indexes of all relevant variables.
Minisat::lbool checkFormula()
Checks the received formula for consistency.
void varBumpActivity(Minisat::Var v)
Increase a variable with the current 'bump' value.
BooleanVarMap mBooleanVarMap
Maps the Boolean variables to their corresponding Minisat variable.
Minisat::vec< Minisat::Lit > trail
Assignment stack; stores all assignments made in the order they were made.
std::unordered_set< int > mLevelCounter
void computeAdvancedLemmas()
static Minisat::Var mapVar(Minisat::Var x, Minisat::vec< Minisat::Var > &map, Minisat::Var &max)
[Minisat related code]
VarLemmaMap mPropagatedLemmas
Stores for each variable the corresponding formulas which control its value.
int64_t simpDB_props
Remaining number of propagations that must be made before next execution of 'simplify()'.
double learntsize_factor
The initial limit for learned clauses is a factor of the original clauses.(default 1 / 3)
int ccmin_mode
Controls conflict clause minimization (0=none, 1=basic, 2=deep).
void updateInfeasibleSubset()
Updates the infeasible subset found by the SATModule, if the received formula is unsatisfiable.
bool litRedundant(Minisat::Lit p, uint32_t abstract_levels)
Check if 'p' can be removed.
bool mChangedPassedFormula
A flag, which is set to true, if anything has been changed in the passed formula between now and the ...
void printCurrentAssignment(std::ostream &=std::cout, const std::string &="") const
Prints the current assignment of the SAT solver.
bool supportedConstraintType(const FormulaT &_formula) const
void claBumpActivity(Minisat::Clause &c)
Increase a clause with the current 'bump' value.
Minisat::vec< double > activity
A heuristic measurement of the activity of a variable.
TseitinVarShadows mTseitinVarShadows
std::vector< std::pair< size_t, size_t > > mLiteralsActivOccurrences
int level(const Minisat::vec< Minisat::Lit > &) const
void printPropagatedLemmas(std::ostream &_out=std::cout, const std::string &_init="") const
Prints the propagated lemmas for each variables which influence its value.
carl::FastMap< FormulaT, Minisat::Lit > mFormulaAssumptionMap
carl::Bitset mTseitinVariable
Stores whether a given variable is a tseitin variable.
static double luby(double y, int x)
Finite subsequences of the Luby-sequence:
void adaptPassedFormula()
Adapts the passed formula according to the current assignment within the SAT solver.
void cancelUntil(int level, bool force=false)
Revert to the state at given level (keeping all assignments at 'level' but not beyond).
size_t mNumberOfFullLazyCalls
The number of full laze calls made.
Answer mCurrentAssignmentConsistent
Stores gained information about the current assignment's consistency.
void simplify()
Removes already satisfied clauses and performs simplifications on all clauses.
void printClauses(const Minisat::vec< Minisat::CRef > &_clauses, const std::string _name, std::ostream &_out=std::cout, const std::string &_init="", int=0, bool _withAssignment=false, bool _onlyNotSatisfied=false) const
Prints all given clauses.
void collectStats()
Collects the taken statistics.
Minisat::vec< Minisat::CRef > satisfiedClauses
List of problem clauses.
void interrupt()
Trigger a (potentially asynchronous) interruption of the solver.
Minisat::vec< Minisat::CRef > unknown_excludes
List of clauses which exclude a call resulted in unknown.
int learntsize_adjust_cnt
[Minisat related code]
void attachClause(Minisat::CRef cr)
Attach a clause to watcher lists.
ModuleInput::iterator mUpperBoundOnMinimal
void removeTheoryPropagation(int _position)
BooleanConstraintMap mBooleanConstraintMap
Maps each Minisat variable to a pair of Abstractions, one contains the abstraction information of the...
Minisat::vec< bool > mLemmasRemovable
is the lemma removable
int qhead
Head of queue (as index into the trail – no more explicit propagation queue in MiniSat).
~SATModule()
Destructs this SATModule.
double restart_inc
The factor with which the restart limit is multiplied in each restart. (default 1....
void handleConflict(Minisat::CRef _confl)
Handles conflict.
bool expPositionsCorrect() const
ClauseSet mLearntDeductions
If problem is unsatisfiable (possibly under assumptions), this vector represent the final conflict cl...
Minisat::Clause & getClause(Minisat::CRef cr)
Minisat::CRef propagate()
propagate : [void] -> [Clause*]
void checkAbstractionsConsistency()
void removeSatisfied(Minisat::vec< Minisat::CRef > &cs)
Removes all satisfied clauses from the given vector of clauses, which should only be performed in dec...
Minisat::vec< unsigned > mNonTseitinShadowedOccurrences
ConstraintLiteralsMap mConstraintLiteralMap
Maps the constraints occurring in the SAT module to their abstractions.
Minisat::vec< int > trail_lim
Separator indices for different decision levels in 'trail'.
Answer checkCore()
Checks the received formula for consistency.
carl::FastMap< signed, std::vector< signed > > TseitinVarShadows
void checkGarbage(void)
[Minisat related code]
Minisat::vec< Minisat::Lit > analyze_toclear
[Minisat related code]
double progressEstimate() const
int mCurr_Restarts
The number of restarts made.
void printDecisions(std::ostream &_out=std::cout, const std::string &_init="") const
Prints the decisions the SAT solver has made.
int decisionLevel() const
void relocAll(Minisat::ClauseAllocator &to)
[Minisat related code]
void setConfBudget(int64_t x)
[Minisat related code]
SATModule(const ModuleInput *_formula, Conditionals &_foundAnswer, Manager *const _manager=nullptr)
Constructs a SATModule.
uint64_t dec_vars
[Minisat related code]
Minisat::Lit pickBranchLit()
bool bool_satisfied(const Minisat::Clause &c) const
void printBooleanVarMap(std::ostream &_out=std::cout, const std::string &_init="") const
Prints map of the Boolean within the SAT solver to the given Booleans.
bool processLemmas()
Adds clauses representing the lemmas which should be added to this SATModule.
Minisat::vec< Minisat::Lit > assumptions
Current set of assumptions provided to solve by the user.
std::vector< unsigned > mCurrentTheoryConflictTypes
void addConstraintToInform(const FormulaT &)
Adds a constraint to the collection of constraints of this module, which are informed to a freshly ge...
double max_learnts
[Minisat related code]
unsigned mNumberOfTheoryCalls
The number of theory calls made.
Minisat::vec< Minisat::vec< Minisat::Lit > > mLemmas
literals propagated by lemmas
Minisat::lbool search(int nof_conflicts=100)
search : (nof_conflicts : int) (params : const SearchParams&) -> [lbool]
int restart_first
The initial restart limit. (default 100)
MinisatVarMap mMinisatVarMap
Maps the Minisat variables to their corresponding boolean variable.
bool addClause(const Minisat::vec< Minisat::Lit > &_clause, unsigned _type=0)
Adds the clause of the given type with the given literals to the clauses managed by Minisat.
size_t mTheoryConflictIdCounter
void removeCore(ModuleInput::const_iterator)
Removes everything related to the given sub-formula of the received formula.
uint64_t clauses_literals
Minisat::CRef reason(Minisat::Var x)
Minisat::CRef storeLemmas()
void budgetOff()
[Minisat related code]
bool mExcludedAssignments
bool enqueue(Minisat::Lit p, Minisat::CRef from=Minisat::CRef_Undef)
Test if fact 'p' contradicts current state, enqueue otherwise.
bool passedFormulaCorrect() const
VarScheduler var_scheduler
A priority queue of variables.
void incrementTseitinShadowOccurrences(signed _var)
Minisat::vec< char > decision
Declares if a variable is eligible for selection in the decision heuristic.
uint32_t abstractLevel(Minisat::Var x) const
Used to represent an abstraction of sets of decision levels.
double var_decay
[Minisat related code]
carl::FastMap< carl::Variable, Minisat::Var > BooleanVarMap
Maps the Boolean variables to their corresponding Minisat variable.
void detachClause(Minisat::CRef cr, bool strict=false)
Detach a clause to watcher lists.
int phase_saving
Controls the level of phase saving (0=none, 1=limited, 2=full).
FormulaCNFInfosMap mFormulaCNFInfosMap
Maps the clauses in the received formula to the corresponding Minisat clause and Minisat literal.
void printSatState(std::ostream &=std::cout, const std::string="")
[Minisat related code]
void varDecayActivity()
Decay all variables with the specified factor.
bool satisfied(const Minisat::Clause &c) const
void addBooleanAssignments(RationalAssignment &_rationalAssignment) const
Adds the Boolean assignments to the given assignments, which were determined by the Minisat procedure...
void addClause_(const Minisat::vec< Minisat::Lit > &_clause, unsigned _type, const FormulaT &_original, typename FormulaCNFInfosMap::iterator _formulaCNFInfoIter)
Base class for variable schedulers.
Base class for all MCSAT variable scheduler.
Minisat::lbool evaluateLiteral(Minisat::Lit lit) const
Evaluate a literal in the theory, set lastReason to last theory decision involved.
int assignedAtTrailIndex(Minisat::Var variable) const
int decisionLevel(Minisat::Var v) const
Minisat::Var minisatVar(const carl::Variable &v) const
void sort(T *array, int size, LessThan lt)
static bool find(V &ts, const T &t)
RegionAllocator< uint32_t >::Ref CRef
static const unsigned NORMAL_CLAUSE
Lit mkLit(Var var, bool sign=false)
static const unsigned LEMMA_CLAUSE
std::variant< FormulaT, ClauseChain > Explanation
void validateClause(const T &t, bool enabled)
Class to create the formulas for axioms.
carl::Formula< Poly > FormulaT
carl::Assignment< Rational > RationalAssignment
const settings::Settings & Settings()
carl::Model< Rational, Poly > Model
Answer
An enum with the possible answers a Module can give.
std::vector< std::atomic_bool * > Conditionals
A vector of atomic bool pointers.
carl::Formulas< Poly > FormulasT
#define SMTRAT_LOG_TRACE(channel, msg)
#define SMTRAT_LOG_WARN(channel, msg)
#define SMTRAT_LOG_DEBUG(channel, msg)
Minisat::CRef cref
[Minisat related code]
Stores all information regarding a Boolean abstraction of a constraint.
std::shared_ptr< std::vector< FormulaT > > origins
bool updatedReabstraction
bool isDeduction
A flag, which is set to false, if the constraint corresponding to the abstraction is redundant and he...
bool consistencyRelevant
A flag, which is set to false, if the constraint corresponding to the abstraction does not occur in t...
FormulaT reabstraction
The constraint corresponding to this abstraction.
ModuleInput::iterator position
The position of the corresponding constraint in the passed formula.
int updateInfo
<0, if the corresponding constraint must still be added to the passed formula; >0,...
Abstraction(ModuleInput::iterator _position, const FormulaT &_reabstraction)
Constructs abstraction information, for a literal which does actually not belong to an abstraction.
Abstraction(const Abstraction &)=delete
std::vector< Minisat::CRef > mClauses
size_t numOfNegatives() const
void addPositive(Minisat::CRef _cref)
void reloc(Minisat::ClauseAllocator &_ca, Minisat::ClauseAllocator &_to)
std::vector< Minisat::CRef > mNegatives
const std::vector< Minisat::CRef > & negatives() const
LiteralClauses(LiteralClauses &&_toMove)
size_t numOfPositives() const
void addNegative(Minisat::CRef _cref)
void removeNegative(Minisat::CRef _cref)
void removePositive(Minisat::CRef _cref)
LiteralClauses(const LiteralClauses &)=delete
const std::vector< Minisat::CRef > & positives() const
std::vector< Minisat::CRef > mPositives
std::size_t operator()(const std::vector< Minisat::Lit > &cl) const
void insert(const std::vector< Minisat::Lit > &cl)
std::unordered_set< std::vector< Minisat::Lit >, UnorderedClauseHasher > mData
Stores all clauses as sets to quickly check for duplicates.
void preprocess(std::vector< Minisat::Lit > &cl) const
bool contains(const std::vector< Minisat::Lit > &cl) const
Stores information about a Minisat variable.
Minisat::CRef reason
A reference to the clause, which implied the current assignment of this variable.
int mTrailIndex
The index in the trail.
VarData(Minisat::CRef _reason, int _level, int _trailIndex)
int level
The level in which the variable has been assigned, if it is not unassigned.
int mExpPos
Position of explanation.
VarOrderLt(Minisat::vec< double > &activity)
Minisat::vec< double > & activity
bool operator()(Minisat::Var x, Minisat::Var y)
WatcherDeleted(const Minisat::ClauseAllocator &_ca)
[Minisat related code]
bool operator()(const Minisat::Watcher &w) const
[Minisat related code]
const Minisat::ClauseAllocator & ca
[Minisat related code]
bool operator()(Minisat::Lit x, Minisat::Lit y)
int levelOf(Minisat::Var v)
lemma_lt(SATModule &solver)