diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2020-06-03 08:47:46 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-03 08:47:46 -0500 |
commit | 6c8702ab5eb08466bf954e202241df39de680081 (patch) | |
tree | 3feb6e0f2dc64619ce131006f479350eb8e275fd /src/parser | |
parent | 0a960638857ae4682162cf19b47801bc19dd94c3 (diff) |
Do not apply unconstrained simplification when quantifiers are present (#4532)
Fixes #4437.
This is a simpler fix that aborts the preprocessing pass when a quantifier is encountered.
It also updates our smt2 parser to throw a logic exception when forall/exists is used in non-quantified logics. This is required to ensure that unconstrained simplification does not throw an exception to a user as a result of accidentally setting the wrong logic.
Diffstat (limited to 'src/parser')
-rw-r--r-- | src/parser/smt2/Smt2.g | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/parser/smt2/Smt2.g b/src/parser/smt2/Smt2.g index 081990a45..f29e03380 100644 --- a/src/parser/smt2/Smt2.g +++ b/src/parser/smt2/Smt2.g @@ -1692,7 +1692,13 @@ termNonVariable[CVC4::api::Term& expr, CVC4::api::Term& expr2] std::vector<api::Sort> argTypes; } : LPAREN_TOK quantOp[kind] - { PARSER_STATE->pushScope(true); } + { + if (!PARSER_STATE->isTheoryEnabled(theory::THEORY_QUANTIFIERS)) + { + PARSER_STATE->parseError("Quantifier used in non-quantified logic."); + } + PARSER_STATE->pushScope(true); + } boundVarList[bvl] term[f, f2] RPAREN_TOK { |