return d_logicSet;
}
+inline void Smt::addUf() {
+ addTheory(Smt::THEORY_EMPTY);
+ addOperator(kind::APPLY_UF);
+}
+
/**
* Sets the logic for the current benchmark. Declares any logic and theory symbols.
*
break;
case QF_UFIDL:
+ case QF_UFLIA:
addTheory(THEORY_INTS);
- // falling-through on purpose, to add UF part of UFIDL
+ addUf();
+ break;
+
+ case QF_UFLRA:
+ case QF_UFNRA:
+ addTheory(THEORY_REALS);
+ addUf();
+ break;
case QF_UF:
- addTheory(THEORY_EMPTY);
- addOperator(kind::APPLY_UF);
+ addUf();
break;
case AUFLIA:
case AUFLIRA:
case AUFNIRA:
+ case LRA:
+ case UFNIA:
case QF_AUFBV:
case QF_AUFLIA:
case QF_BV:
// TODO: check arity
{ expr = MK_EXPR(CVC4::kind::APPLY_UF,args); }
- | /* An ite expression */
- LPAREN_TOK ITE_TOK
- term[expr]
- { args.push_back(expr); }
- term[expr]
- { args.push_back(expr); }
- term[expr]
- { args.push_back(expr); }
- RPAREN_TOK
- { expr = MK_EXPR(CVC4::kind::ITE, args); }
+ // | /* An ite expression */
+ // LPAREN_TOK ITE_TOK
+ // term[expr]
+ // { args.push_back(expr); }
+ // term[expr]
+ // { args.push_back(expr); }
+ // term[expr]
+ // { args.push_back(expr); }
+ // RPAREN_TOK
+ // { expr = MK_EXPR(CVC4::kind::ITE, args); }
| /* a let binding */
LPAREN_TOK LET_TOK LPAREN_TOK
{ expr = PARSER_STATE->getVariable(name); }
/* constants */
-// | TRUE_TOK { expr = MK_CONST(true); }
-// | FALSE_TOK { expr = MK_CONST(false); }
| INTEGER_LITERAL
{ expr = MK_CONST( AntlrInput::tokenToInteger($INTEGER_LITERAL) ); }
+
| DECIMAL_LITERAL
{ // FIXME: This doesn't work because an SMT rational is not a valid GMP rational string
expr = MK_CONST( AntlrInput::tokenToRational($DECIMAL_LITERAL) ); }
+
| HEX_LITERAL
{ Assert( AntlrInput::tokenText($HEX_LITERAL).find("#x") == 0 );
std::string hexString = AntlrInput::tokenTextSubstr($HEX_LITERAL,2);
expr = MK_CONST( BitVector(hexString, 16) ); }
+
| BINARY_LITERAL
{ Assert( AntlrInput::tokenText($BINARY_LITERAL).find("#b") == 0 );
std::string binString = AntlrInput::tokenTextSubstr($BINARY_LITERAL,2);
| XOR_TOK { $kind = CVC4::kind::XOR; }
| EQUAL_TOK { $kind = CVC4::kind::EQUAL; }
| DISTINCT_TOK { $kind = CVC4::kind::DISTINCT; }
+ | ITE_TOK { $kind = CVC4::kind::ITE; }
| GREATER_THAN_TOK
{ $kind = CVC4::kind::GT; }
| GREATER_THAN_TOK EQUAL_TOK
{ $kind = CVC4::kind::LT; }
| PLUS_TOK { $kind = CVC4::kind::PLUS; }
| STAR_TOK { $kind = CVC4::kind::MULT; }
- | TILDE_TOK { $kind = CVC4::kind::UMINUS; }
| MINUS_TOK { $kind = CVC4::kind::MINUS; }
| SELECT_TOK { $kind = CVC4::kind::SELECT; }
| STORE_TOK { $kind = CVC4::kind::STORE; }