SMT-RAT
24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
|
#include <State.h>
Public Types | |
enum | Type { TEST_CANDIDATE_TO_GENERATE , SUBSTITUTION_TO_APPLY , COMBINE_SUBRESULTS } |
typedef carl::FastPointerMapB< Substitution, ConditionSetSetSet > | ConflictSets |
typedef std::vector< std::pair< ConditionList, bool > > | SubstitutionResult |
typedef std::vector< SubstitutionResult > | SubstitutionResults |
typedef std::vector< std::pair< unsigned, unsigned > > | SubResultCombination |
typedef smtrat::vb::VariableBounds< const Condition * > | VariableBoundsCond |
Public Member Functions | |
State (carl::IDPool *_conditionIdAllocator, bool _withVariableBounds) | |
Constructs an empty state (no conditions yet) being the root (hence neither a substitution) of the state tree which is going to be formed when applying the satisfiability check based on virtual substitution. More... | |
State (State *const _father, const Substitution &_substitution, carl::IDPool *_conditionIdAllocator, bool _withVariableBounds) | |
Constructs a state being a child of the given state and containing the given substitution, which maps from the index variable of the given state. More... | |
State (const State &)=delete | |
~State () | |
Destructor. More... | |
bool | isRoot () const |
bool | cannotBeSolved (bool _lazy) const |
bool & | rCannotBeSolved () |
bool & | rCannotBeSolvedLazy () |
bool | markedAsDeleted () const |
bool & | rMarkedAsDeleted () |
bool | hasChildrenToInsert () const |
bool & | rHasChildrenToInsert () |
carl::Variable::Arg | index () const |
size_t | valuation () const |
size_t | backendCallValuation () const |
size_t | id () const |
size_t & | rID () |
std::list< State * > & | rChildren () |
const std::list< State * > & | children () const |
State * | pFather () const |
const State & | father () const |
State & | rFather () |
ConflictSets & | rConflictSets () |
const ConflictSets & | conflictSets () const |
bool & | rHasRecentlyAddedConditions () |
bool | hasRecentlyAddedConditions () const |
bool & | rInconsistent () |
bool | isInconsistent () const |
ConditionList & | rConditions () |
const ConditionList & | conditions () const |
Substitution & | rSubstitution () |
const Substitution & | substitution () const |
SubstitutionResults & | rSubstitutionResults () |
const SubstitutionResults & | substitutionResults () const |
SubResultCombination & | rSubResultCombination () |
const SubResultCombination & | subResultCombination () const |
const Substitution * | pSubstitution () const |
bool | conditionsSimplified () const |
bool | subResultsSimplified () const |
bool & | rSubResultsSimplified () |
bool | takeSubResultCombAgain () const |
bool & | rTakeSubResultCombAgain () |
bool | tryToRefreshIndex () const |
bool | hasSubResultsCombination () const |
bool | hasSubstitutionResults () const |
bool | unfinished () const |
Type | type () const |
Type & | rType () |
const Condition * | pOriginalCondition () const |
const Condition & | originalCondition () const |
const carl::PointerSet< Condition > & | tooHighDegreeConditions () const |
carl::PointerSet< Condition > & | rTooHighDegreeConditions () |
const VariableBoundsCond & | variableBounds () const |
VariableBoundsCond & | rVariableBounds () |
void | setOriginalCondition (const Condition *_pOCondition) |
Sets the pointer of the original condition of this state to the given pointer to a condition. More... | |
size_t | currentRangeSize () const |
void | resetCurrentRangeSize () |
const smtrat::Rational & | minIntTestCandidate () const |
const smtrat::Rational & | maxIntTestCandidate () const |
bool | hasInfinityChild () const |
void | resetInfinityChild (const State *_state) |
void | setInfinityChild (State *_state) |
void | resetCannotBeSolvedLazyFlags () |
unsigned | treeDepth () const |
bool | substitutionApplicable () const |
Checks if a substitution can be applied. More... | |
bool | substitutionApplicable (const smtrat::ConstraintT &_constraint) const |
Checks if the substitution of this state can be applied to the given constraint. More... | |
bool | hasNoninvolvedCondition () const |
Checks whether a condition exists, which was not involved in an elimination step. More... | |
bool | allTestCandidatesInvalidated (const Condition *_condition) const |
bool | hasChildWithID () const |
Checks whether a child exists, which has no ID (!=0). More... | |
bool | containsState (const State *_state) const |
bool | hasOnlyInconsistentChildren () const |
Checks whether a child exists, which is not yet marked as inconsistent. More... | |
bool | occursInEquation (const carl::Variable &) const |
Checks whether the given variable occurs in a equation. More... | |
bool | hasFurtherUncheckedTestCandidates () const |
Checks whether there exist more than one test candidate, which has still not been checked. More... | |
void | variables (carl::Variables &_variables) const |
Finds the variables, which occur in this state. More... | |
unsigned | numberOfNodes () const |
Determines the number of nodes in the tree with this state as root. More... | |
State & | root () |
bool | getNextIntTestCandidate (smtrat::Rational &_nextIntTestCandidate, size_t _maxIntRange) |
bool | updateIntTestCandidates () |
bool | unfinishedAncestor (State *&_unfinAnt) |
Determines (if it exists) a ancestor node, which is unfinished, that is it has still substitution results to consider. More... | |
bool | bestCondition (const Condition *&_bestCondition, size_t _numberOfAllVariables, bool _preferEquation) |
Determines the most adequate condition and in it the most adequate variable in the state to generate test candidates for. More... | |
ConditionList::iterator | constraintExists (const smtrat::ConstraintT &_constraint) |
Checks if the given constraint already exists as condition in the state. More... | |
void | simplify (ValuationMap &_ranking) |
Cleans up all conditions in this state according to comparison between the corresponding constraints. More... | |
bool | simplify (ConditionList &_conditionVectorToSimplify, ConditionSetSet &_conflictSet, ValuationMap &_ranking, bool _stateConditions=false) |
Simplifies the given conditions according to comparison between the corresponding constraints. More... | |
void | setIndex (const carl::Variable &_index) |
Sets the index of this state. More... | |
void | addConflictSet (const Substitution *_substitution, ConditionSetSet &&_condSetSet) |
Adds a conflict set to the map of substitutions to conflict sets. More... | |
void | addConflicts (const Substitution *_substitution, ConditionSetSet &&_condSetSet) |
Adds all conflicts to all sets of the conflict set of the given substitution. More... | |
void | resetConflictSets () |
Clears the conflict sets. More... | |
bool | updateOCondsOfSubstitutions (const Substitution &_substitution, std::vector< State * > &_reactivatedStates) |
Updates the original conditions of substitutions having the same test candidate as the given. More... | |
void | addSubstitutionResults (std::vector< DisjunctionOfConditionConjunctions > &&_disjunctionsOfCondConj) |
Adds the given substitution results to this state. More... | |
bool | extendSubResultCombination () |
Extends the currently considered combination of conjunctions in the substitution results. More... | |
bool | nextSubResultCombination () |
If the state contains a substitution result, which is a conjunction of disjunctions of conjunctions of conditions, this method sets the current combination to the disjunctions to the next combination. More... | |
size_t | getNumberOfCurrentSubresultCombination () const |
ConditionList | getCurrentSubresultCombination () const |
Gets the current substitution result combination as condition vector. More... | |
bool | refreshConditions (ValuationMap &_ranking) |
Determines the condition vector corresponding to the current combination of the conjunctions of conditions. More... | |
void | initConditionFlags () |
Sets all flags of the conditions to true, if it contains the variable given by the states index. More... | |
bool | initIndex (const carl::Variables &_allVariables, const smtrat::VariableValuationStrategy &_vvstrat, bool _preferEquation, bool _tryDifferentVarOrder=false, bool _useFixedVariableOrder=false) |
Sets, if it has not already happened, the index of the state to the name of the most adequate variable. More... | |
void | bestConstraintValuation (const std::vector< std::pair< carl::Variable, std::multiset< double >>> &_varVals) |
void | averageConstraintValuation (const std::vector< std::pair< carl::Variable, std::multiset< double >>> &_varVals) |
void | worstConstraintValuation (const std::vector< std::pair< carl::Variable, std::multiset< double >>> &_varVals) |
void | addCondition (const smtrat::ConstraintT &_constraint, const carl::PointerSet< Condition > &_originalConditions, size_t _valutation, bool _recentlyAdded, ValuationMap &_ranking) |
Adds a constraint to the conditions of this state. More... | |
bool | checkSubresultCombinations () const |
This is just for debug purpose. More... | |
int | deleteOrigins (carl::PointerSet< Condition > &_originsToDelete, ValuationMap &_ranking) |
Removes everything in this state originated by the given vector of conditions. More... | |
void | deleteOriginsFromChildren (carl::PointerSet< Condition > &_originsToDelete, ValuationMap &_ranking) |
Deletes everything originated by the given conditions in the children of this state. More... | |
void | deleteOriginsFromConflictSets (carl::PointerSet< Condition > &_originsToDelete, bool _originsAreCurrentConditions) |
Deletes everything originated by the given conditions in the conflict sets of this state. More... | |
void | deleteOriginsFromSubstitutionResults (carl::PointerSet< Condition > &_originsToDelete) |
Deletes everything originated by the given conditions in the substitution results of this state. More... | |
void | deleteConditions (carl::PointerSet< Condition > &_conditionsToDelete, ValuationMap &_ranking) |
Delete everything originated by the given conditions from the entire subtree with this state as root. More... | |
std::vector< State * > | addChild (const Substitution &_substitution) |
Adds a state as child to this state with the given substitution. More... | |
void | updateValuation (bool _lazy) |
Updates the valuation of this state. More... | |
void | updateBackendCallValuation () |
Valuates the state's currently considered conditions according to a backend call. More... | |
void | passConflictToFather (bool _checkConflictForSideCondition, bool _useBackjumping=true, bool _includeInconsistentTestCandidates=false) |
Passes the original conditions of the covering set of the conflicts of this state to its father. More... | |
bool | hasLocalConflict () |
Checks whether the currently considered conditions, which have been considered for test candidate construction, form already a conflict. More... | |
bool | checkTestCandidatesForBounds () |
Checks whether the test candidate of this state is valid against the variable intervals in the father of this state. More... | |
std::vector< smtrat::DoubleInterval > | solutionSpace (carl::PointerSet< Condition > &_conflictReason) const |
Determines the solution space of the test candidate of this state regarding to the variable bounds of the father. More... | |
bool | hasRootsInVariableBounds (const Condition *_condition, bool _useSturmSequence) |
Checks whether there are no zeros for the left-hand side of the constraint of the given condition. More... | |
void | print (const std::string _initiation="***", std::ostream &_out=std::cout) const |
Prints the conditions, the substitution and the substitution results of this state and all its children. More... | |
void | printAlone (const std::string="***", std::ostream &_out=std::cout) const |
Prints the conditions, the substitution and the substitution results of this state. More... | |
void | printConditions (const std::string _initiation="***", std::ostream &_out=std::cout, bool=false) const |
Prints the conditions of this state. More... | |
void | printSubstitutionResults (const std::string _initiation="***", std::ostream &_out=std::cout) const |
Prints the substitution results of this state. More... | |
void | printSubstitutionResultCombination (const std::string _initiation="***", std::ostream &_out=std::cout) const |
Prints the combination of substitution results used in this state. More... | |
void | printSubstitutionResultCombinationAsNumbers (const std::string _initiation="***", std::ostream &_out=std::cout) const |
Prints the combination of substitution results, expressed in numbers, used in this state. More... | |
void | printConflictSets (const std::string _initiation="***", std::ostream &_out=std::cout) const |
Prints the conflict sets of this state. More... | |
Static Public Member Functions | |
static void | removeStatesFromRanking (const State &toRemove, ValuationMap &_ranking) |
static size_t | coveringSet (const ConditionSetSetSet &_conflictSets, carl::PointerSet< Condition > &_minCovSet, unsigned _currentTreeDepth) |
Finds a covering set of a vector of sets of sets due to some heuristics. More... | |
Private Attributes | |
bool | mConditionsSimplified |
A flag indicating whether the conditions this state considers are simplified. More... | |
bool | mHasChildrenToInsert |
A flag indicating whether there are states that are children of this state and must be still considered in the further progress of finding a solution. More... | |
bool | mHasRecentlyAddedConditions |
A flag that indicates whether this state has conditions in its considered list of conditions, which were recently added and, hence, must be propagated further. More... | |
bool | mInconsistent |
A flag that indicates whether this state is already inconsistent. More... | |
bool | mMarkedAsDeleted |
A flag indicating whether this state has already marked as deleted, which means that there is no need to consider it in the further progress of finding a solution. More... | |
bool | mSubResultsSimplified |
A flag indicating whether the substitution results this state are simplified. More... | |
bool | mTakeSubResultCombAgain |
A flag indicating whether to take the current combination of substitution results once again. More... | |
bool | mTestCandidateCheckedForBounds |
A flag indicating whether the test candidate contained by this state has already been check for the bounds of the variables. More... | |
bool | mCannotBeSolved |
A flag indicating whether this state has been progressed until a point where a condition must be involved having a too high degree to tackle with virtual substitution. More... | |
bool | mCannotBeSolvedLazy |
bool | mTryToRefreshIndex |
A flag indicating whether the index (the variable to eliminate in this state) should be reconsidered and maybe changed. More... | |
size_t | mBackendCallValuation |
A heuristically determined value stating the expected difficulty of this state's considered conditions to be solved by a backend. More... | |
size_t | mID |
A unique id identifying this state. More... | |
size_t | mValuation |
A heuristically determined value stating the expected difficulty of this state's considered conditions to be solved by virtual substitution. More... | |
Type | mType |
The type of this state, which states whether this state has still a substitution to apply or either test candidates shall be generated or a new combination of the substitution results must be found in order to consider it next. More... | |
carl::Variable | mIndex |
The variable which is going to be eliminated from this state's considered conditions. More... | |
const Condition * | mpOriginalCondition |
If the test candidate considered by this state stems from a condition for which it is enough to consider it only for test candidate generation for finding the satisfiability of the conditions it occurs in, this member stores that condition. More... | |
State * | mpFather |
The father state of this state. More... | |
Substitution * | mpSubstitution |
The substitution this state considers. Note that it is NULL if this state is the root. More... | |
SubstitutionResults * | mpSubstitutionResults |
The vector storing the substitution results, that is for each application of the substitution in this state to one of its considered conditions a disjunction of conjunctions of constraints. More... | |
SubResultCombination * | mpSubResultCombination |
The currently considered combination of conjunctions of constraints in the substitution result vector, which form the currently considered conditions of this state (store in mpConditions). More... | |
ConditionList * | mpConditions |
The currently considered conditions of this state, for which the satisfiability must be checked. More... | |
ConflictSets * | mpConflictSets |
Stores for each already considered and failed test candidate all conflicts which have been found for it. More... | |
std::list< State * > * | mpChildren |
The children states of this state. More... | |
carl::PointerSet< Condition > * | mpTooHighDegreeConditions |
The conditions of this state, which cannot be solved by the virtual substitution. More... | |
VariableBoundsCond * | mpVariableBounds |
A pointer to an object which manages and stores the bounds on the variables occurring in this state. More... | |
State * | mpInfinityChild |
smtrat::Rational | mMinIntTestCanidate |
smtrat::Rational | mMaxIntTestCanidate |
size_t | mCurrentIntRange |
carl::IDPool * | mpConditionIdAllocator |
std::vector< std::pair< carl::Variable, std::multiset< double > > > | mRealVarVals |
std::vector< std::pair< carl::Variable, std::multiset< double > > > | mIntVarVals |
std::vector< size_t > | mBestVarVals |
typedef carl::FastPointerMapB<Substitution,ConditionSetSetSet> smtrat::vs::State::ConflictSets |
typedef std::vector<std::pair< unsigned, unsigned> > smtrat::vs::State::SubResultCombination |
typedef std::vector<std::pair< ConditionList, bool> > smtrat::vs::State::SubstitutionResult |
typedef std::vector<SubstitutionResult> smtrat::vs::State::SubstitutionResults |
typedef smtrat::vb::VariableBounds<const Condition*> smtrat::vs::State::VariableBoundsCond |
smtrat::vs::State::State | ( | carl::IDPool * | _conditionIdAllocator, |
bool | _withVariableBounds | ||
) |
Constructs an empty state (no conditions yet) being the root (hence neither a substitution) of the state tree which is going to be formed when applying the satisfiability check based on virtual substitution.
_withVariableBounds | A flag that indicates whether to use optimizations based on variable bounds. |
Definition at line 30 of file State.cpp.
smtrat::vs::State::State | ( | State *const | _father, |
const Substitution & | _substitution, | ||
carl::IDPool * | _conditionIdAllocator, | ||
bool | _withVariableBounds | ||
) |
Constructs a state being a child of the given state and containing the given substitution, which maps from the index variable of the given state.
_father | The father of the state to be constructed. |
_substitution | The substitution of the state to be constructed. |
_withVariableBounds | A flag that indicates whether to use optimizations based on variable bounds. |
|
delete |
smtrat::vs::State::~State | ( | ) |
std::vector< State * > smtrat::vs::State::addChild | ( | const Substitution & | _substitution | ) |
void smtrat::vs::State::addCondition | ( | const smtrat::ConstraintT & | _constraint, |
const carl::PointerSet< Condition > & | _originalConditions, | ||
size_t | _valutation, | ||
bool | _recentlyAdded, | ||
ValuationMap & | _ranking | ||
) |
Adds a constraint to the conditions of this state.
_constraint | The constraint of the condition to add. |
_originalConditions | The original conditions of the condition to add. |
_valutation | The valuation of the condition to add. |
_recentlyAdded | Is the condition a recently added one. @sideeffect The state can obtain a new condition. |
Definition at line 1438 of file State.cpp.
void smtrat::vs::State::addConflicts | ( | const Substitution * | _substitution, |
ConditionSetSet && | _condSetSet | ||
) |
void smtrat::vs::State::addConflictSet | ( | const Substitution * | _substitution, |
ConditionSetSet && | _condSetSet | ||
) |
Adds a conflict set to the map of substitutions to conflict sets.
_substitution | The corresponding substitution generated the conflict. (NULL in the case a detected conflict without substitution) |
_condSetSet | The conflicts to add. |
Definition at line 818 of file State.cpp.
void smtrat::vs::State::addSubstitutionResults | ( | std::vector< DisjunctionOfConditionConjunctions > && | _disjunctionsOfCondConj | ) |
bool smtrat::vs::State::allTestCandidatesInvalidated | ( | const Condition * | _condition | ) | const |
A | condition, which is one of the currently considered constraints to check for satisfiability. |
Definition at line 230 of file State.cpp.
void smtrat::vs::State::averageConstraintValuation | ( | const std::vector< std::pair< carl::Variable, std::multiset< double >>> & | _varVals | ) |
|
inline |
bool smtrat::vs::State::bestCondition | ( | const Condition *& | _bestCondition, |
size_t | _numberOfAllVariables, | ||
bool | _preferEquation | ||
) |
Determines the most adequate condition and in it the most adequate variable in the state to generate test candidates for.
_bestCondition | The most adequate condition to be the next test candidate provider. |
_numberOfAllVariables | The number of all globally known variables. |
_preferEquation | A flag that indicates to prefer equations in the heuristics of this method. |
Definition at line 398 of file State.cpp.
void smtrat::vs::State::bestConstraintValuation | ( | const std::vector< std::pair< carl::Variable, std::multiset< double >>> & | _varVals | ) |
|
inline |
bool smtrat::vs::State::checkSubresultCombinations | ( | ) | const |
bool smtrat::vs::State::checkTestCandidatesForBounds | ( | ) |
Checks whether the test candidate of this state is valid against the variable intervals in the father of this state.
Definition at line 2297 of file State.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
ConditionList::iterator smtrat::vs::State::constraintExists | ( | const smtrat::ConstraintT & | _constraint | ) |
Checks if the given constraint already exists as condition in the state.
_constraint | The constraint, for which we want to know, if it already exists as condition in the state. |
Definition at line 435 of file State.cpp.
bool smtrat::vs::State::containsState | ( | const State * | _state | ) | const |
|
static |
Finds a covering set of a vector of sets of sets due to some heuristics.
_conflictSets | The vector of sets of sets, for which the method finds all minimum covering sets. |
_minCovSet | The found mininum covering set. |
_currentTreeDepth | The tree depth of the state from which this method is invoked. |
Definition at line 2817 of file State.cpp.
void smtrat::vs::State::deleteConditions | ( | carl::PointerSet< Condition > & | _conditionsToDelete, |
ValuationMap & | _ranking | ||
) |
int smtrat::vs::State::deleteOrigins | ( | carl::PointerSet< Condition > & | _originsToDelete, |
ValuationMap & | _ranking | ||
) |
Removes everything in this state originated by the given vector of conditions.
_originsToDelete | The conditions for which everything in this state which has been originated by them must be removed. |
Definition at line 1510 of file State.cpp.
void smtrat::vs::State::deleteOriginsFromChildren | ( | carl::PointerSet< Condition > & | _originsToDelete, |
ValuationMap & | _ranking | ||
) |
Deletes everything originated by the given conditions in the children of this state.
_originsToDelete | The condition for which to delete everything originated by them. |
Definition at line 1682 of file State.cpp.
void smtrat::vs::State::deleteOriginsFromConflictSets | ( | carl::PointerSet< Condition > & | _originsToDelete, |
bool | _originsAreCurrentConditions | ||
) |
Deletes everything originated by the given conditions in the conflict sets of this state.
_originsToDelete | The condition for which to delete everything originated by them. |
_originsAreCurrentConditions | A flag indicating whether the origins to remove stem from conditions of the currently considered condition vector of the father of this state and not, e.g., from somewhere in its substitution results. |
Definition at line 1714 of file State.cpp.
void smtrat::vs::State::deleteOriginsFromSubstitutionResults | ( | carl::PointerSet< Condition > & | _originsToDelete | ) |
Deletes everything originated by the given conditions in the substitution results of this state.
_originsToDelete | The conditions for which to delete everything originated by them. |
Definition at line 1846 of file State.cpp.
bool smtrat::vs::State::extendSubResultCombination | ( | ) |
|
inline |
ConditionList smtrat::vs::State::getCurrentSubresultCombination | ( | ) | const |
bool smtrat::vs::State::getNextIntTestCandidate | ( | smtrat::Rational & | _nextIntTestCandidate, |
size_t | _maxIntRange | ||
) |
size_t smtrat::vs::State::getNumberOfCurrentSubresultCombination | ( | ) | const |
|
inline |
bool smtrat::vs::State::hasChildWithID | ( | ) | const |
bool smtrat::vs::State::hasFurtherUncheckedTestCandidates | ( | ) | const |
bool smtrat::vs::State::hasLocalConflict | ( | ) |
bool smtrat::vs::State::hasNoninvolvedCondition | ( | ) | const |
bool smtrat::vs::State::hasOnlyInconsistentChildren | ( | ) | const |
|
inline |
bool smtrat::vs::State::hasRootsInVariableBounds | ( | const Condition * | _condition, |
bool | _useSturmSequence | ||
) |
Checks whether there are no zeros for the left-hand side of the constraint of the given condition.
_condition | The condition to check. |
A | flag that indicates whether to include Sturm's sequences and root counting in this method. |
Definition at line 2423 of file State.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
void smtrat::vs::State::initConditionFlags | ( | ) |
bool smtrat::vs::State::initIndex | ( | const carl::Variables & | _allVariables, |
const smtrat::VariableValuationStrategy & | _vvstrat, | ||
bool | _preferEquation, | ||
bool | _tryDifferentVarOrder = false , |
||
bool | _useFixedVariableOrder = false |
||
) |
Sets, if it has not already happened, the index of the state to the name of the most adequate variable.
Which variable is taken depends on heuristics.
_allVariables | All globally known variables. |
_vvstrat | The strategy according which we choose the variable. |
_preferEquation | A flag that indicates to prefer equations in the heuristics of this method. |
_tryDifferentVarOrder |
Definition at line 1191 of file State.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
bool smtrat::vs::State::nextSubResultCombination | ( | ) |
If the state contains a substitution result, which is a conjunction of disjunctions of conjunctions of conditions, this method sets the current combination to the disjunctions to the next combination.
Definition at line 992 of file State.cpp.
unsigned smtrat::vs::State::numberOfNodes | ( | ) | const |
bool smtrat::vs::State::occursInEquation | ( | const carl::Variable & | _variable | ) | const |
|
inline |
void smtrat::vs::State::passConflictToFather | ( | bool | _checkConflictForSideCondition, |
bool | _useBackjumping = true , |
||
bool | _includeInconsistentTestCandidates = false |
||
) |
Passes the original conditions of the covering set of the conflicts of this state to its father.
_checkConflictForSideCondition | If this flag is set to false it might save some computations but leads to an over-approximative behavior. Recommendation: set it to true. |
_includeInconsistentTestCandidates | If this flag is set to true the conflict analysis takes also the invalid test candidates' conflict sets into account. Recommendation: set it to false. |
_useBackjumping | If true, we use the backjumping technique. |
Definition at line 2082 of file State.cpp.
|
inline |
|
inline |
void smtrat::vs::State::print | ( | const std::string | _initiation = "***" , |
std::ostream & | _out = std::cout |
||
) | const |
void smtrat::vs::State::printAlone | ( | const std::string | _initiation = "***" , |
std::ostream & | _out = std::cout |
||
) | const |
Prints the conditions, the substitution and the substitution results of this state.
_initiation | A string which is printed in the beginning of every row. |
_out | The stream to print on. |
Definition at line 2580 of file State.cpp.
void smtrat::vs::State::printConditions | ( | const std::string | _initiation = "***" , |
std::ostream & | _out = std::cout , |
||
bool | _onlyAsConstraints = false |
||
) | const |
void smtrat::vs::State::printConflictSets | ( | const std::string | _initiation = "***" , |
std::ostream & | _out = std::cout |
||
) | const |
void smtrat::vs::State::printSubstitutionResultCombination | ( | const std::string | _initiation = "***" , |
std::ostream & | _out = std::cout |
||
) | const |
Prints the combination of substitution results used in this state.
_initiation | A string which is printed in the beginning of every row. |
_out | The stream to print on. |
Definition at line 2712 of file State.cpp.
void smtrat::vs::State::printSubstitutionResultCombinationAsNumbers | ( | const std::string | _initiation = "***" , |
std::ostream & | _out = std::cout |
||
) | const |
void smtrat::vs::State::printSubstitutionResults | ( | const std::string | _initiation = "***" , |
std::ostream & | _out = std::cout |
||
) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
bool smtrat::vs::State::refreshConditions | ( | ValuationMap & | _ranking | ) |
|
static |
void smtrat::vs::State::resetConflictSets | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
State & smtrat::vs::State::root | ( | ) |
|
inline |
Definition at line 468 of file State.h.
|
inline |
|
inline |
|
inline |
Definition at line 449 of file State.h.
|
inline |
|
inline |
|
inline |
Definition at line 581 of file State.h.
|
inline |
void smtrat::vs::State::setIndex | ( | const carl::Variable & | _index | ) |
|
inline |
|
inline |
bool smtrat::vs::State::simplify | ( | ConditionList & | _conditionVectorToSimplify, |
ConditionSetSet & | _conflictSet, | ||
ValuationMap & | _ranking, | ||
bool | _stateConditions = false |
||
) |
Simplifies the given conditions according to comparison between the corresponding constraints.
_conditionVectorToSimplify | The conditions to simplify. Note, that this method can change these conditions. |
_conflictSet | All conflicts this method detects in the given conditions are stored in here. |
_stateConditions | A flag indicating whether the conditions to simplify are from the considered condition vector of this state and not, e.g., from somewhere in its substitution results. |
Definition at line 586 of file State.cpp.
void smtrat::vs::State::simplify | ( | ValuationMap & | _ranking | ) |
std::vector< smtrat::DoubleInterval > smtrat::vs::State::solutionSpace | ( | carl::PointerSet< Condition > & | _conflictReason | ) | const |
Determines the solution space of the test candidate of this state regarding to the variable bounds of the father.
The solution space consists of one or two disjoint intervals.
_conflictReason | If the solution space is empty, the conditions being responsible for this conflict are stored in here. |
Definition at line 2324 of file State.cpp.
|
inline |
Definition at line 478 of file State.h.
|
inline |
|
inline |
bool smtrat::vs::State::substitutionApplicable | ( | ) | const |
bool smtrat::vs::State::substitutionApplicable | ( | const smtrat::ConstraintT & | _constraint | ) | const |
Checks if the substitution of this state can be applied to the given constraint.
_constraint | The constraint, for which we want to know, if the substitution is applicable. |
Definition at line 209 of file State.cpp.
|
inline |
Definition at line 458 of file State.h.
|
inline |
|
inline |
unsigned smtrat::vs::State::treeDepth | ( | ) | const |
|
inline |
|
inline |
|
inline |
bool smtrat::vs::State::unfinishedAncestor | ( | State *& | _unfinAnt | ) |
Determines (if it exists) a ancestor node, which is unfinished, that is it has still substitution results to consider.
_unfinAnt | The unfinished ancestor node. |
Definition at line 386 of file State.cpp.
void smtrat::vs::State::updateBackendCallValuation | ( | ) |
bool smtrat::vs::State::updateIntTestCandidates | ( | ) |
bool smtrat::vs::State::updateOCondsOfSubstitutions | ( | const Substitution & | _substitution, |
std::vector< State * > & | _reactivatedStates | ||
) |
Updates the original conditions of substitutions having the same test candidate as the given.
_substitution | The substitution containing the test candidate to check for. |
_reactivatedStates |
Definition at line 873 of file State.cpp.
void smtrat::vs::State::updateValuation | ( | bool | _lazy | ) |
|
inline |
|
inline |
void smtrat::vs::State::variables | ( | carl::Variables & | _variables | ) | const |
void smtrat::vs::State::worstConstraintValuation | ( | const std::vector< std::pair< carl::Variable, std::multiset< double >>> & | _varVals | ) |
|
private |
|
private |
A flag indicating whether this state has been progressed until a point where a condition must be involved having a too high degree to tackle with virtual substitution.
Note, that this flag is also set to true if heuristics decide that the combinatorial blow up using virtual substitution for the considered list of conditions of this state is too high. If this flag is set to true, it the state is delayed until a point where only such state remain and a backend must be involved.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
If the test candidate considered by this state stems from a condition for which it is enough to consider it only for test candidate generation for finding the satisfiability of the conditions it occurs in, this member stores that condition.
It is necessary, as it must be part of the origins (conditions in the father of this state) of any conflict found in this state.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
A heuristically determined value stating the expected difficulty of this state's considered conditions to be solved by virtual substitution.
The higher this value, the easier it should be to solve this state's considered conditions. Furthermore, this value enforces currently a depth first search, as a child has always a higher valuation than its father.