STPMgr& bm;
//boost::object_pool<ASTNode> node_pool;
bool alreadyWarned;
-
+ bool print_success;
public:
LETMgr letMgr;
NodeFactory* nf;
alreadyWarned = false;
cache.push_back(Entry(SOLVER_UNDECIDED));
symbols.push_back(ASTVec());
-
+ print_success=false;
}
const ASTVec GetAsserts(void)
return bm.LookupSymbol(name);
}
+ void setPrintSuccess(bool ps)
+ {
+ print_success= ps;
+ }
+
bool isSymbolAlreadyDeclared(string name)
{
letMgr._parser_symbol_table.insert(s);
}
+ void
+ success()
+ {
+ if (print_success)
+ {
+ cout << "success" << endl;
+ flush(cout);
+ }
+ }
+
void
pop()
{
":difficulty" { return DIFFICULTY_TOK; }
":smt-lib-version" { return VERSION_TOK; }
":status" { return STATUS_TOK; }
+":print-success" { return PRINT_TOK; }
+
/* COMMANDS */
"set-logic" { return LOGIC_TOK; }
"set-info" { return NOTES_TOK; }
+"set-option" { return OPTION_TOK; }
"declare-fun" { return DECLARE_FUNCTION_TOK; }
"push" { return PUSH_TOK;}
"pop" { return POP_TOK;}
/*
- "set-option"
"declare-sort"
"define-sort"
-
- "pop"
*/
"assert" { return FORMULA_TOK; }
"check-sat" { return CHECK_SAT_TOK; }
%token DIFFICULTY_TOK
%token VERSION_TOK
%token STATUS_TOK
+%token PRINT_TOK
/* ASCII Symbols */
/* Semicolons (comments) are ignored by the lexer */
%token CHECK_SAT_TOK
%token LOGIC_TOK
%token NOTES_TOK
+%token OPTION_TOK
%token DECLARE_FUNCTION_TOK
%token FORMULA_TOK
%token PUSH_TOK
0 == strcmp($3->c_str(),"QF_AUFBV"))) {
yyerror("Wrong input logic:");
}
+ parserInterface->success();
delete $3;
}
| LPAREN_TOK NOTES_TOK attribute STRING_TOK RPAREN_TOK
{
delete $4;
}
+| LPAREN_TOK OPTION_TOK attribute RPAREN_TOK
+ {
+ }
| LPAREN_TOK NOTES_TOK attribute DECIMAL_TOK RPAREN_TOK
{}
| LPAREN_TOK NOTES_TOK attribute RPAREN_TOK
parserInterface->push();
assertionsSMT2.push_back(ASTVec());
}
+ parserInterface->success();
}
| LPAREN_TOK POP_TOK NUMERAL_TOK RPAREN_TOK
{
parserInterface->pop();
assertionsSMT2.erase(assertionsSMT2.end()-1);
}
+ parserInterface->success();
}
| LPAREN_TOK DECLARE_FUNCTION_TOK var_decl RPAREN_TOK
- {}
+ {
+ parserInterface->success();
+ }
| LPAREN_TOK FORMULA_TOK an_formula RPAREN_TOK
{
assertionsSMT2.back().push_back(*$3);
parserInterface->deleteNode($3);
+ parserInterface->success();
}
;
{}
| STATUS_TOK status
{}
+| PRINT_TOK TRUE_TOK
+{
+ parserInterface->setPrintSuccess(true);
+ parserInterface->success();
+}
+| PRINT_TOK FALSE_TOK
+{
+ parserInterface->setPrintSuccess(false);
+}
+
;
var_decl: