| FP_TO_SBV_TOK m=INTEGER_LITERAL
{ op = MK_CONST(FloatingPointToSBV(AntlrInput::tokenToUnsigned($m))); }
| TESTER_TOK term[expr, expr2] {
+ if( expr.getKind()==kind::APPLY_CONSTRUCTOR ){
+ //for nullary constructors, must get the operator
+ expr = expr.getOperator();
+ }
if( !expr.getType().isConstructor() ){
PARSER_STATE->parseError("Bad syntax for test (_ is X), X must be a constructor.");
}
--- /dev/null
+; COMMAND-LINE: --lang=smt2.6
+; EXPECT: sat
+(set-logic ALL)
+(set-info :status sat)
+(declare-datatypes ((nat 0)(list 0)(tree 0)) (((succ (pred nat)) (zero))
+((cons (car tree) (cdr list)) (null))
+((node (children list)) (leaf (data nat)))
+))
+(declare-fun x1 () nat)
+(declare-fun x2 () nat)
+(declare-fun x3 () nat)
+(declare-fun x4 () nat)
+(declare-fun x5 () nat)
+(declare-fun x6 () list)
+(declare-fun x7 () list)
+(declare-fun x8 () list)
+(declare-fun x9 () list)
+(declare-fun x10 () list)
+(declare-fun x11 () tree)
+(declare-fun x12 () tree)
+(declare-fun x13 () tree)
+(declare-fun x14 () tree)
+(declare-fun x15 () tree)
+
+(assert (and (and (= x9 x7) ((_ is node) x11)) (not ((_ is zero) x5))))
+(check-sat)
+
+