diff --git a/src/util/find_symbols.cpp b/src/util/find_symbols.cpp index 0bfaefb8ef6..a3b46c691ce 100644 --- a/src/util/find_symbols.cpp +++ b/src/util/find_symbols.cpp @@ -13,7 +13,7 @@ Author: Daniel Kroening, kroening@kroening.com #include "range.h" #include "std_expr.h" -/// Kinds of symbols to be considered by \ref has_symbol or \ref find_symbols. +/// Kinds of symbols to be considered by \ref find_symbols. enum class symbol_kindt { /// Struct, union, or enum tag symbols. @@ -29,20 +29,6 @@ enum class symbol_kindt F_ALL }; -bool has_symbol(const exprt &src, const find_symbols_sett &symbols) -{ - if(src.id() == ID_symbol) - return symbols.count(to_symbol_expr(src).get_identifier()) != 0; - else - { - forall_operands(it, src) - if(has_symbol(*it, symbols)) - return true; - } - - return false; -} - static bool find_symbols( symbol_kindt, const typet &, @@ -310,14 +296,6 @@ void find_type_and_expr_symbols(const typet &src, find_symbols_sett &dest) }); } -void find_symbols_or_nexts(const exprt &src, find_symbols_sett &dest) -{ - find_symbols(symbol_kindt::F_EXPR, src, [&dest](const symbol_exprt &e) { - dest.insert(e.get_identifier()); - return true; - }); -} - void find_symbols(const exprt &src, find_symbols_sett &dest) { find_symbols(symbol_kindt::F_EXPR, src, [&dest](const symbol_exprt &e) { diff --git a/src/util/find_symbols.h b/src/util/find_symbols.h index 5679e24a29f..6de59bd5485 100644 --- a/src/util/find_symbols.h +++ b/src/util/find_symbols.h @@ -10,7 +10,6 @@ Author: Daniel Kroening, kroening@kroening.com #ifndef CPROVER_UTIL_FIND_SYMBOLS_H #define CPROVER_UTIL_FIND_SYMBOLS_H -#include "deprecate.h" #include "irep.h" #include @@ -31,29 +30,10 @@ bool has_symbol_expr( const irep_idt &identifier, bool include_bound_symbols); -DEPRECATED(SINCE(2022, 3, 14, "use find_symbols")) -/// Add to the set \p dest the sub-expressions of \p src with id ID_symbol or -/// ID_next_symbol -void find_symbols_or_nexts(const exprt &src, find_symbols_sett &dest); - /// Add to the set \p dest the sub-expressions of \p src with id ID_symbol, for /// both free and bound variables. void find_symbols(const exprt &src, find_symbols_sett &dest); -/// \return set of sub-expressions of the expressions contained in the range -/// defined by \p begin and \p end which have id ID_symbol or ID_next_symbol -template -DEPRECATED(SINCE(2022, 3, 14, "use find_symbols and a local iteration")) -find_symbols_sett find_symbols_or_nexts(iteratort begin, iteratort end) -{ - static_assert( - std::is_base_of::value, - "find_symbols takes exprt iterators as arguments"); - find_symbols_sett result; - std::for_each(begin, end, [&](const exprt &e) { find_symbols(e, result); }); - return result; -} - /// Find sub expressions with id ID_symbol, considering both free and bound /// variables. void find_symbols( @@ -78,12 +58,6 @@ inline find_symbols_sett find_symbol_identifiers(const exprt &src) return identifiers; } -DEPRECATED(SINCE(2022, 3, 14, "use has_symbol_expr(exprt, irep_idt, bool)")) -/// \return true if one of the symbols in \p src is present in \p symbols -bool has_symbol( - const exprt &src, - const find_symbols_sett &symbols); - /// Collect all type tags contained in \p src and add them to \p dest. void find_type_symbols( const typet &src,