}
: attribute[key]
( USER_VALUE
- { smt_command = new SetInfoCommand(key, AntlrInput::tokenText($USER_VALUE)); }
+ { std::string value = AntlrInput::tokenText($USER_VALUE);
+ Assert(*value.begin() == '{');
+ Assert(*value.rbegin() == '}');
+ value.erase(value.begin(), value.begin() + 1);
+ value.erase(value.begin(), std::find_if(value.begin(), value.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));
+ value.erase(value.end() - 1);
+ value.erase(std::find_if(value.rbegin(), value.rend(), std::not1(std::ptr_fun<int, int>(std::isspace))).base(), value.end());
+ smt_command = new SetInfoCommand(key, value); }
)?
{ if(smt_command == NULL) {
smt_command = new EmptyCommand(std::string("annotation: ") + key);
* with an open brace and end with closed brace.
*/
USER_VALUE
- : '{' ( '\\{' | '\\}' | ~('{' | '}') )* '}'
+ : '{' ('\\{' | '\\}' | ~('{' | '}'))* '}'
;
/**
// by default, symmetry breaker is on only for QF_UF
if(! Options::current()->ufSymmetryBreakerSetByUser) {
+ Trace("smt") << "setting uf symmetry breaker to " << (s == "QF_UF") << std::endl;
NodeManager::currentNM()->getOptions()->ufSymmetryBreaker = (s == "QF_UF");
}
+ // by default, nonclausal simplification is off for QF_SAT
+ if(! Options::current()->simplificationModeSetByUser) {
+ Trace("smt") << "setting simplification mode to <" << s << "> " << (s != "QF_SAT") << std::endl;
+ NodeManager::currentNM()->getOptions()->simplificationMode = (s == "QF_SAT" ? Options::SIMPLIFICATION_MODE_NONE : Options::SIMPLIFICATION_MODE_BATCH);
+ }
// If in arrays, set the UF handler to arrays
if(s == "QF_AX") {
lazyDefinitionExpansion(false),
printWinner(false),
simplificationMode(SIMPLIFICATION_MODE_BATCH),
+ simplificationModeSetByUser(false),
doStaticLearning(true),
interactive(false),
interactiveSetByUser(false),
case SIMPLIFICATION_MODE:
if(!strcmp(optarg, "batch")) {
simplificationMode = SIMPLIFICATION_MODE_BATCH;
+ simplificationModeSetByUser = true;
} else if(!strcmp(optarg, "incremental")) {
simplificationMode = SIMPLIFICATION_MODE_INCREMENTAL;
+ simplificationModeSetByUser = true;
} else if(!strcmp(optarg, "none")) {
simplificationMode = SIMPLIFICATION_MODE_NONE;
+ simplificationModeSetByUser = true;
} else if(!strcmp(optarg, "help")) {
puts(simplificationHelp.c_str());
exit(1);
/** When/whether to perform nonclausal simplifications. */
SimplificationMode simplificationMode;
+ /** Whether the user set the nonclausal simplification mode. */
+ bool simplificationModeSetByUser;
/** Whether to perform the static learning pass. */
bool doStaticLearning;