-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transition to context dependent search state #580
base: master
Are you sure you want to change the base?
Transition to context dependent search state #580
Conversation
1c03f5a
to
c603ece
Compare
8931930
to
cc8dce6
Compare
5cd09ed
to
5a10f4e
Compare
@@ -101,7 +101,7 @@ void DnCWorker::popOneSubQueryAndSolve( bool restoreTreeStates ) | |||
|
|||
bool fullSolveNeeded = true; // denotes whether we need to solve the subquery | |||
if ( restoreTreeStates && smtState ) | |||
fullSolveNeeded = _engine->restoreSmtState( *smtState ); | |||
fullSolveNeeded = true; //_engine->restoreSmtState( *smtState ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to fully remove this functionality for now? Maybe we want to also purge this option here:
Marabou/src/configuration/OptionParser.cpp
Line 148 in bdcd044
( "restore-tree-states", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I will remove it altogether as it is obsolete now.
@@ -514,6 +523,7 @@ class PiecewiseLinearConstraint : public ITableau::VariableWatcher | |||
*/ | |||
bool isCaseInfeasible( PhaseStatus phase ) const; | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove empty line
src/engine/oldSmtCore
Outdated
@@ -0,0 +1,257 @@ | |||
/********************* */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this and oldSmtCorecpp?
@@ -201,6 +204,35 @@ void PiecewiseLinearConstraint::setStatistics( Statistics *statistics ) | |||
_statistics = statistics; | |||
} | |||
|
|||
bool PiecewiseLinearConstraint::phaseFixed() const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When _cdPhaseStatus is not null, does this method always have the same output as isImplication()? If so do we want to merge the two methods?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Longterm we want to merge the two methods. This PR already does a lot and I didn't want to complicate things further, since I am not convinced that this would be a trivial change (e.g. Max/Disjunction semantics). PhaseFixed currently is derived from bound propagation while isImplication is derived from search/backtracking.
@@ -205,23 +208,24 @@ class DisjunctionConstraintTestSuite : public CxxTest::TestSuite | |||
dc.notifyLowerBound( 2, -10 ); | |||
dc.notifyUpperBound( 2, 10 ); | |||
|
|||
TS_ASSERT( !dc.phaseFixed() ); | |||
TS_ASSERT( !dc.isImplication() ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to also check phaseFixed() iff isImplication()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No the semantics actually differ. Disjunction does not ever explicitly fix the phase, it actually used a test that is exactly the implementation of isImplication. Therefore I removed the special implementation of DisjunctionConstraint::phaseFixed() and replaced the calls with isImplication().
90d7105
to
ae98cd4
Compare
This reverts commit 59db095.
…arts. This change is to avoid violating preconditions of the PiecewiseLinearConstraints::registerBoundManager method.
Previous semantics matched an empty/infeasible disjunction.
The method encapsulates both phaseFixed and isImplication semantics, prioritizing isImplication.
ae98cd4
to
6dba340
Compare
This PR transitions to using Context dependent architecture to store the search state.
This is achieved by using the CD features of PiecewiseLinearConstraints to store their current state in the search.
The SmtCore now uses the PiecewiseLinearConstraint::nextFeasibleCase/markUnfeasible to record the advancement of the search with the PiecewiseLinearConstraints.
This PR: