return;
}
+ if(! d_logic.isLocked()) {
+ // ensure that our heuristics are properly set up
+ setLogicInternal();
+ }
+
// finish initalization, creat the prop engine, etc.
finishInit();
"hasn't finished initializing!" );
d_fullyInited = true;
- d_logic.lock();
+ Assert(d_logic.isLocked());
d_propEngine->assertFormula(NodeManager::currentNM()->mkConst<bool>(true));
d_propEngine->assertFormula(NodeManager::currentNM()->mkConst<bool>(false).notNode());
}
// Turn on justification heuristic of the decision engine for QF_BV and QF_AUFBV
// and also use it in stop-only mode for QF_AUFLIA, QF_LRA and Quantifiers
+ // BUT use neither in ALL_SUPPORTED mode (since it doesn't yet work well
+ // with incrementality)
if(!options::decisionMode.wasSetByUser()) {
decision::DecisionMode decMode =
- //QF_BV
- (not d_logic.isQuantified() &&
- d_logic.isPure(THEORY_BV)
- ) ||
- //QF_AUFBV
- (not d_logic.isQuantified() &&
- d_logic.isTheoryEnabled(THEORY_ARRAY) &&
- d_logic.isTheoryEnabled(THEORY_UF) &&
- d_logic.isTheoryEnabled(THEORY_BV)
- ) ||
- //QF_AUFLIA (and may be ends up enabling QF_AUFLRA?)
- (not d_logic.isQuantified() &&
- d_logic.isTheoryEnabled(THEORY_ARRAY) &&
- d_logic.isTheoryEnabled(THEORY_UF) &&
- d_logic.isTheoryEnabled(THEORY_ARITH)
- ) ||
- // QF_LRA
- (not d_logic.isQuantified() &&
- d_logic.isPure(THEORY_ARITH) && d_logic.isLinear() && !d_logic.isDifferenceLogic() && !d_logic.areIntegersUsed()
- ) ||
- // Quantifiers
- d_logic.isQuantified()
- ? decision::DECISION_STRATEGY_JUSTIFICATION
- : decision::DECISION_STRATEGY_INTERNAL;
+ // ALL_SUPPORTED
+ d_logic.hasEverything() ? decision::DECISION_STRATEGY_INTERNAL :
+ ( // QF_BV
+ (not d_logic.isQuantified() &&
+ d_logic.isPure(THEORY_BV)
+ ) ||
+ // QF_AUFBV
+ (not d_logic.isQuantified() &&
+ d_logic.isTheoryEnabled(THEORY_ARRAY) &&
+ d_logic.isTheoryEnabled(THEORY_UF) &&
+ d_logic.isTheoryEnabled(THEORY_BV)
+ ) ||
+ // QF_AUFLIA (and may be ends up enabling QF_AUFLRA?)
+ (not d_logic.isQuantified() &&
+ d_logic.isTheoryEnabled(THEORY_ARRAY) &&
+ d_logic.isTheoryEnabled(THEORY_UF) &&
+ d_logic.isTheoryEnabled(THEORY_ARITH)
+ ) ||
+ // QF_LRA
+ (not d_logic.isQuantified() &&
+ d_logic.isPure(THEORY_ARITH) && d_logic.isLinear() && !d_logic.isDifferenceLogic() && !d_logic.areIntegersUsed()
+ ) ||
+ // Quantifiers
+ d_logic.isQuantified()
+ ? decision::DECISION_STRATEGY_JUSTIFICATION
+ : decision::DECISION_STRATEGY_INTERNAL
+ );
bool stoponly =
- // QF_AUFLIA
- (not d_logic.isQuantified() &&
- d_logic.isTheoryEnabled(THEORY_ARRAY) &&
- d_logic.isTheoryEnabled(THEORY_UF) &&
- d_logic.isTheoryEnabled(THEORY_ARITH)
- ) ||
- // QF_LRA
- (not d_logic.isQuantified() &&
- d_logic.isPure(THEORY_ARITH) && d_logic.isLinear() && !d_logic.isDifferenceLogic() && !d_logic.areIntegersUsed()
- ) ||
- // Quantifiers
- d_logic.isQuantified()
- ? true : false;
+ // ALL_SUPPORTED
+ d_logic.hasEverything() ? false :
+ ( // QF_AUFLIA
+ (not d_logic.isQuantified() &&
+ d_logic.isTheoryEnabled(THEORY_ARRAY) &&
+ d_logic.isTheoryEnabled(THEORY_UF) &&
+ d_logic.isTheoryEnabled(THEORY_ARITH)
+ ) ||
+ // QF_LRA
+ (not d_logic.isQuantified() &&
+ d_logic.isPure(THEORY_ARITH) && d_logic.isLinear() && !d_logic.isDifferenceLogic() && !d_logic.areIntegersUsed()
+ ) ||
+ // Quantifiers
+ d_logic.isQuantified()
+ ? true : false
+ );
Trace("smt") << "setting decision mode to " << decMode << std::endl;
options::decisionMode.set(decMode);
TS_ASSERT( !info.isSharingEnabled() );
TS_ASSERT( info.isPure( THEORY_BOOL ) );
TS_ASSERT( !info.isQuantified() );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( info.hasNothing() );
info = LogicInfo("AUFLIA");
TS_ASSERT( !info.isPure( THEORY_BOOL ) );
TS_ASSERT( info.areIntegersUsed() );
TS_ASSERT( !info.isDifferenceLogic() );
TS_ASSERT( !info.areRealsUsed() );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("AUFLIRA");
TS_ASSERT( !info.isPure( THEORY_BOOL ) );
TS_ASSERT( info.areIntegersUsed() );
TS_ASSERT( !info.isDifferenceLogic() );
TS_ASSERT( info.areRealsUsed() );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("AUFNIRA");
TS_ASSERT( !info.isPure( THEORY_BOOL ) );
TS_ASSERT( info.areIntegersUsed() );
TS_ASSERT( !info.isDifferenceLogic() );
TS_ASSERT( info.areRealsUsed() );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("LRA");
TS_ASSERT( !info.isPure( THEORY_BOOL ) );
TS_ASSERT( !info.areIntegersUsed() );
TS_ASSERT( !info.isDifferenceLogic() );
TS_ASSERT( info.areRealsUsed() );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("QF_ABV");
TS_ASSERT( !info.isPure( THEORY_BOOL ) );
TS_ASSERT( info.isTheoryEnabled( THEORY_BV ) );
TS_ASSERT( !info.isTheoryEnabled( THEORY_DATATYPES ) );
TS_ASSERT( info.isTheoryEnabled( THEORY_BOOL ) );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("QF_AUFBV");
TS_ASSERT( !info.isQuantified() );
TS_ASSERT( info.isTheoryEnabled( THEORY_BV ) );
TS_ASSERT( !info.isTheoryEnabled( THEORY_DATATYPES ) );
TS_ASSERT( info.isTheoryEnabled( THEORY_BOOL ) );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("QF_AUFLIA");
TS_ASSERT( !info.isQuantified() );
TS_ASSERT( info.areIntegersUsed() );
TS_ASSERT( !info.isDifferenceLogic() );
TS_ASSERT( !info.areRealsUsed() );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("QF_AX");
TS_ASSERT( !info.isQuantified() );
TS_ASSERT( !info.isTheoryEnabled( THEORY_BV ) );
TS_ASSERT( !info.isTheoryEnabled( THEORY_DATATYPES ) );
TS_ASSERT( info.isTheoryEnabled( THEORY_BOOL ) );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("QF_BV");
TS_ASSERT( !info.isQuantified() );
TS_ASSERT( info.isTheoryEnabled( THEORY_BV ) );
TS_ASSERT( !info.isTheoryEnabled( THEORY_DATATYPES ) );
TS_ASSERT( info.isTheoryEnabled( THEORY_BOOL ) );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("QF_IDL");
TS_ASSERT( !info.isQuantified() );
TS_ASSERT( info.isDifferenceLogic() );
TS_ASSERT( info.areIntegersUsed() );
TS_ASSERT( !info.areRealsUsed() );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("QF_LIA");
TS_ASSERT( !info.isQuantified() );
TS_ASSERT( !info.isDifferenceLogic() );
TS_ASSERT( info.areIntegersUsed() );
TS_ASSERT( !info.areRealsUsed() );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("QF_LRA");
TS_ASSERT( !info.isQuantified() );
TS_ASSERT( !info.isDifferenceLogic() );
TS_ASSERT( !info.areIntegersUsed() );
TS_ASSERT( info.areRealsUsed() );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("QF_NIA");
TS_ASSERT( !info.isQuantified() );
TS_ASSERT( !info.isDifferenceLogic() );
TS_ASSERT( info.areIntegersUsed() );
TS_ASSERT( !info.areRealsUsed() );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("QF_NRA");
TS_ASSERT( !info.isQuantified() );
TS_ASSERT( !info.isDifferenceLogic() );
TS_ASSERT( !info.areIntegersUsed() );
TS_ASSERT( info.areRealsUsed() );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("QF_RDL");
TS_ASSERT( !info.isQuantified() );
TS_ASSERT( info.isDifferenceLogic() );
TS_ASSERT( !info.areIntegersUsed() );
TS_ASSERT( info.areRealsUsed() );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("QF_UF");
TS_ASSERT( !info.isPure( THEORY_BOOL ) );
TS_ASSERT( info.isPure( THEORY_UF ) );
TS_ASSERT( !info.isTheoryEnabled( THEORY_BV ) );
TS_ASSERT( info.isTheoryEnabled( THEORY_BOOL ) );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("QF_UFBV");
TS_ASSERT( !info.isQuantified() );
TS_ASSERT( info.isTheoryEnabled( THEORY_BV ) );
TS_ASSERT( !info.isTheoryEnabled( THEORY_DATATYPES ) );
TS_ASSERT( info.isTheoryEnabled( THEORY_BOOL ) );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("QF_UFIDL");
TS_ASSERT( !info.isQuantified() );
TS_ASSERT( info.isDifferenceLogic() );
TS_ASSERT( info.areIntegersUsed() );
TS_ASSERT( !info.areRealsUsed() );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("QF_UFLIA");
TS_ASSERT( !info.isQuantified() );
TS_ASSERT( !info.isDifferenceLogic() );
TS_ASSERT( info.areIntegersUsed() );
TS_ASSERT( !info.areRealsUsed() );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("QF_UFLRA");
TS_ASSERT( !info.isQuantified() );
TS_ASSERT( !info.isDifferenceLogic() );
TS_ASSERT( !info.areIntegersUsed() );
TS_ASSERT( info.areRealsUsed() );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("QF_UFNRA");
TS_ASSERT( !info.isQuantified() );
TS_ASSERT( !info.isDifferenceLogic() );
TS_ASSERT( !info.areIntegersUsed() );
TS_ASSERT( info.areRealsUsed() );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("UFLRA");
TS_ASSERT( info.isQuantified() );
TS_ASSERT( !info.isDifferenceLogic() );
TS_ASSERT( !info.areIntegersUsed() );
TS_ASSERT( info.areRealsUsed() );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("UFNIA");
TS_ASSERT( info.isQuantified() );
TS_ASSERT( !info.isDifferenceLogic() );
TS_ASSERT( info.areIntegersUsed() );
TS_ASSERT( !info.areRealsUsed() );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("QF_ALL_SUPPORTED");
TS_ASSERT( info.isLocked() );
TS_ASSERT( info.areIntegersUsed() );
TS_ASSERT( !info.isDifferenceLogic() );
TS_ASSERT( info.areRealsUsed() );
+ TS_ASSERT( !info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
info = LogicInfo("ALL_SUPPORTED");
TS_ASSERT( info.isLocked() );
TS_ASSERT( info.areIntegersUsed() );
TS_ASSERT( !info.isDifferenceLogic() );
TS_ASSERT( info.areRealsUsed() );
+ TS_ASSERT( info.hasEverything() );
+ TS_ASSERT( !info.hasNothing() );
}
void testDefaultLogic() {