Fixes https://github.com/cvc5/cvc5/issues/8489.
The SMT-LIB standard says that symbols and quoted symbols are identical page 24: `This means for instance that abc and |abc| are the same symbol.`. We did not parse quoted symbols in indexed operators, this fixes the issue.
cvc5::Term f;
cvc5::Term f2;
std::vector<uint32_t> numerals;
+ std::string opName;
}
: functionName[p.d_name, CHECK_NONE]
p.d_kind = cvc5::TUPLE_PROJECT;
p.d_op = SOLVER->mkOp(cvc5::TUPLE_PROJECT, numerals);
}
- | sym=SIMPLE_SYMBOL nonemptyNumeralList[numerals]
+ | functionName[opName, CHECK_NONE] nonemptyNumeralList[numerals]
{
- std::string opName = AntlrInput::tokenText($sym);
cvc5::Kind k = PARSER_STATE->getIndexedOpKind(opName);
if (k == cvc5::UNDEFINED_KIND)
{
regress0/quantifiers/simp-typ-test.smt2
regress0/quantifiers/ufnia-fv-delta.smt2
regress0/quantifiers/veqt-delta.smt2
+ regress0/quoted-symbols.smt2
regress0/rec-fun-const-parse-bug.smt2
regress0/rels/addr_book_0.cvc.smt2
regress0/rels/atom_univ2.cvc.smt2
--- /dev/null
+; EXPECT: sat
+(set-logic ALL)
+(declare-fun x () Int)
+(assert (= |x| 0))
+(declare-fun |y| () Int)
+(assert (= y 0))
+(assert (= (|str.len| "ABC") 3))
+(assert (= ((_ |extract| 3 0) #b010101) #b0101))
+(check-sat)