Fix needsModel method for CEGQI (#5048)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Tue, 15 Sep 2020 02:58:08 +0000 (21:58 -0500)
committerGitHub <noreply@github.com>
Tue, 15 Sep 2020 02:58:08 +0000 (21:58 -0500)
commit4a1b5ea5568fb6c688f407946f9a7fbb1cec3c31
tree016119f36abe7835183ce3ca3e2b7ffdaa383fcb
parent996f6f9e2ecf76e39c236f9c410c109807c7073d
Fix needsModel method for CEGQI (#5048)

There was a bug in CEGQI's needModel method which could say that it doesnt need a model built when there are no active quantifiers. However, computing active quantifiers is not done in QuantifiersEngine::check until after this method is called, meaning it was using stale data on whether a quantifier was active or not. This could lead to the use of bogus models in CEGQI in incremental mode in some corner cases, leading to the assertion failure in #5019.

Fixes #5019.
src/theory/quantifiers/cegqi/inst_strategy_cegqi.cpp
src/theory/quantifiers/first_order_model.cpp
src/theory/quantifiers/first_order_model.h
test/regress/CMakeLists.txt
test/regress/regress1/quantifiers/issue5019-cegqi-i.smt2 [new file with mode: 0644]