return curr->mkSkolem("intvar", curr->integerType(), "is an integer variable created by the dio solver");
}
-DioSolver::DioSolver(context::Context* ctxt) :
- d_lastUsedProofVariable(ctxt,0),
- d_inputConstraints(ctxt),
- d_nextInputConstraintToEnqueue(ctxt, 0),
- d_trail(ctxt),
- d_subs(ctxt),
- d_currentF(),
- d_savedQueue(ctxt),
- d_savedQueueIndex(ctxt, 0),
- d_conflictHasBeenRaised(ctxt, false),
- d_maxInputCoefficientLength(ctxt, 0),
- d_usedDecomposeIndex(ctxt, false),
- d_lastPureSubstitution(ctxt, 0),
- d_pureSubstitionIter(ctxt, 0),
- d_decompositionLemmaQueue(ctxt)
-{}
+DioSolver::DioSolver(context::Context* ctxt)
+ : d_lastUsedProofVariable(ctxt, 0),
+ d_inputConstraints(ctxt),
+ d_nextInputConstraintToEnqueue(ctxt, 0),
+ d_trail(ctxt),
+ d_subs(ctxt),
+ d_currentF(),
+ d_savedQueue(ctxt),
+ d_savedQueueIndex(ctxt, 0),
+ d_conflictIndex(ctxt),
+ d_maxInputCoefficientLength(ctxt, 0),
+ d_usedDecomposeIndex(ctxt, false),
+ d_lastPureSubstitution(ctxt, 0),
+ d_pureSubstitionIter(ctxt, 0),
+ d_decompositionLemmaQueue(ctxt) {}
DioSolver::Statistics::Statistics() :
d_conflictCalls("theory::arith::dio::conflictCalls",0),
#include "base/output.h"
#include "context/cdlist.h"
+#include "context/cdmaybe.h"
#include "context/cdo.h"
#include "context/cdqueue.h"
#include "context/context.h"
std::deque<TrailIndex> d_currentF;
context::CDList<TrailIndex> d_savedQueue;
context::CDO<size_t> d_savedQueueIndex;
-
- context::CDO<bool> d_conflictHasBeenRaised;
- TrailIndex d_conflictIndex;
+ context::CDMaybe<TrailIndex> d_conflictIndex;
/**
* Drop derived constraints with a coefficient length larger than
* Returns true if the context dependent flag for conflicts
* has been raised.
*/
- bool inConflict() const{
- return d_conflictHasBeenRaised;
- }
+ bool inConflict() const { return d_conflictIndex.isSet(); }
/** Raises a conflict at the index ti. */
void raiseConflict(TrailIndex ti){
Assert(!inConflict());
- d_conflictHasBeenRaised = true;
- d_conflictIndex = ti;
+ d_conflictIndex.set(ti);
}
/** Returns the conflict index. */
TrailIndex getConflictIndex() const{
Assert(inConflict());
- return d_conflictIndex;
+ return d_conflictIndex.get();
}
/**