[quantifiers] Fix prenex computation (#5879)
authorHaniel Barbosa <hanielbbarbosa@gmail.com>
Tue, 9 Feb 2021 03:37:10 +0000 (00:37 -0300)
committerGitHub <noreply@github.com>
Tue, 9 Feb 2021 03:37:10 +0000 (00:37 -0300)
commitd0a8c9b331022dce224c230c6b6d7edd416d5866
treecabd0c8ac48394cec45d58833a9432318c962437
parent5baad1b32525ca623aaddfe557a3020edc4fe0b1
[quantifiers] Fix prenex computation (#5879)

Previously our prenex computation could generate quantifiers of the form forall x y y. F, which would lead to an assertion failure in getFreeVariablesScope, as it assumes that no shadowing occurs. This commit makes the prenex computation take a set rather than a vector, thus avoiding duplications of prenexed variables. It also changes mkForall to take a constant vector, since it does not modify the given vector.

Fixes #5693
src/expr/node_algorithm.cpp
src/theory/quantifiers/quantifiers_rewriter.cpp
src/theory/quantifiers/quantifiers_rewriter.h
test/regress/CMakeLists.txt
test/regress/regress0/quantifiers/issue5693-prenex.smt2 [new file with mode: 0644]
test/regress/regress1/quantifiers/prenex-scholl-smt08_RNDPRE_RNDPRE_4_6.smt2 [new file with mode: 0644]