diff --git a/scripts/delete_failing_smt2_solver_tests b/scripts/delete_failing_smt2_solver_tests index 33f1b8a4417..fd8d08c01ba 100755 --- a/scripts/delete_failing_smt2_solver_tests +++ b/scripts/delete_failing_smt2_solver_tests @@ -56,10 +56,7 @@ rm Pointer_byte_extract9/test.desc rm Promotion3/test.desc rm Quantifiers-assertion/test.desc rm Quantifiers-assignment/test.desc -rm Quantifiers-if/test.desc -rm Quantifiers-initialisation2/test.desc rm Quantifiers-invalid-var-range/test.desc -rm Quantifiers-not/test.desc rm Quantifiers-type/test.desc rm Struct_Bytewise2/test.desc rm Union_Initialization1/test.desc diff --git a/src/solvers/smt2/smt2_conv.cpp b/src/solvers/smt2/smt2_conv.cpp index 4f766d80e95..e347caddd26 100644 --- a/src/solvers/smt2/smt2_conv.cpp +++ b/src/solvers/smt2/smt2_conv.cpp @@ -4173,6 +4173,19 @@ void smt2_convt::find_symbols(const exprt &expr) // recursive call on type find_symbols(expr.type()); + if(expr.id() == ID_exists || expr.id() == ID_forall) + { + // do not declare the quantified symbol, but record + // as 'bound symbol' + const auto &q_expr = to_quantifier_expr(expr); + const auto identifier = q_expr.symbol().get_identifier(); + identifiert &id = identifier_map[identifier]; + id.type = q_expr.symbol().type(); + id.is_bound = true; + find_symbols(q_expr.where()); + return; + } + // recursive call on operands forall_operands(it, expr) find_symbols(*it); diff --git a/src/solvers/smt2/smt2_conv.h b/src/solvers/smt2/smt2_conv.h index c5f52a795dd..f8758d04bcc 100644 --- a/src/solvers/smt2/smt2_conv.h +++ b/src/solvers/smt2/smt2_conv.h @@ -284,10 +284,11 @@ class smt2_convt:public prop_convt // keeps track of all non-Boolean symbols and their value struct identifiert { + bool is_bound; typet type; exprt value; - identifiert() + identifiert() : is_bound(false) { type.make_nil(); value.make_nil();