This PR makes sure that enabling strings and nonlinear real arithmetic at the same time works fine.
Right now, the configuration for strings enforces linear arithmetic if no integers are enabled, in particular for NRA.
Fixed #5109.
LogicInfo log(logic.getUnlockedCopy());
// Strings requires arith for length constraints, and also UF
needsUf = true;
- if (!logic.isTheoryEnabled(THEORY_ARITH) || logic.isDifferenceLogic()
- || !logic.areIntegersUsed())
+ if (!logic.isTheoryEnabled(THEORY_ARITH) || logic.isDifferenceLogic())
{
Notice()
<< "Enabling linear integer arithmetic because strings are enabled"
log.enableIntegers();
log.arithOnlyLinear();
}
+ else if (!logic.areIntegersUsed())
+ {
+ Notice() << "Enabling integer arithmetic because strings are enabled"
+ << std::endl;
+ log.enableIntegers();
+ }
logic = log;
logic.lock();
}