Debug("parser") << "applyParseOp: return uminus " << ret << std::endl;
return ret;
}
- if (kind == api::EQ_RANGE && d_solver->getOption("arrays-exp") != "true")
- {
- parseError(
- "eqrange predicate requires option --arrays-exp to be enabled.");
- }
if (kind == api::SINGLETON && args.size() == 1)
{
api::Term ret = d_solver->mkTerm(api::SINGLETON, args[0]);
TrustNode TheoryArrays::ppRewrite(TNode term, std::vector<SkolemLemma>& lems)
{
- // first, see if we need to expand definitions
+ // first, check for logic exceptions
+ Kind k = term.getKind();
+ if (!options().arrays.arraysExp)
+ {
+ if (k == kind::EQ_RANGE)
+ {
+ std::stringstream ss;
+ ss << "Term of kind " << k
+ << " not supported in default mode, try --arrays-exp";
+ throw LogicException(ss.str());
+ }
+ }
+ // see if we need to expand definitions
TrustNode texp = d_rewriter.expandDefinition(term);
if (!texp.isNull())
{
d_ppEqualityEngine.addTerm(term);
NodeManager* nm = NodeManager::currentNM();
Node ret;
- switch (term.getKind()) {
+ switch (k)
+ {
case kind::SELECT: {
// select(store(a,i,v),j) = select(a,j)
// IF i != j
--- /dev/null
+; EXPECT: (error "Term of kind EQ_RANGE not supported in default mode, try --arrays-exp")
+; EXIT: 1
+(set-logic QF_AUFLIA)
+(declare-const a (Array Int Int))
+(assert (eqrange a a 0 0))
+(check-sat)