In SMT 2.6, Datatypes are being introduced and they come
with testers (indexed identifier of the form (_ is c)) and
match expressions. This lead to failures in UFIDL
benchmarks in SMT-LIB because they declare the function
'is'. This commit changes the parser s.t. it does not
consider 'is' and 'match' special tokens unless the theory
of datatypes is enabled.
DECLARE_CODATATYPES_2_5_TOK : { !PARSER_STATE->v2_6() }?'declare-codatatypes';
DECLARE_CODATATYPES_TOK : { PARSER_STATE->v2_6() }?'declare-codatatypes';
PAR_TOK : { PARSER_STATE->v2_6() }?'par';
-TESTER_TOK : { PARSER_STATE->v2_6() }?'is';
-MATCH_TOK : { PARSER_STATE->v2_6() }?'match';
+TESTER_TOK : { PARSER_STATE->v2_6() && PARSER_STATE->isTheoryEnabled(Smt2::THEORY_DATATYPES) }?'is';
+MATCH_TOK : { PARSER_STATE->v2_6() && PARSER_STATE->isTheoryEnabled(Smt2::THEORY_DATATYPES) }?'match';
GET_MODEL_TOK : 'get-model';
ECHO_TOK : 'echo';
REWRITE_RULE_TOK : 'assert-rewrite';
hung10_itesdk_output2.smt2 \
hung10_itesdk_output1.smt2 \
hung13sdk_output2.smt2 \
- declare-funs.smt2
+ declare-funs.smt2 \
+ declare-fun-is-match.smt2
# Regression tests for PL inputs
CVC_TESTS = \
--- /dev/null
+; EXPECT: sat
+(set-info :smt-lib-version 2.6)
+(set-logic UFIDL)
+(set-info :status sat)
+(declare-fun match (Int Int) Int)
+(declare-fun is (Int Int) Int)
+(assert (= match is))
+(check-sat)
+(exit)