Skip to content

Add the deprecation date to each deprecated entity [blocks: #3768, #4248, #4368, #4371] #4423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/goto-instrument/cover.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void instrument_cover_goals(
/// \deprecated use instrument_cover_goals(goto_programt &goto_program,
/// const cover_instrumenterst &instrumenters,
/// message_handlert &message_handler, const irep_idt mode) instead
DEPRECATED("use instrument_cover_goals(goto_programt &...) instead")
DEPRECATED(SINCE(2018, 2, 9, "use instrument_cover_goals goto_programt &..."))
void instrument_cover_goals(
const symbol_tablet &symbol_table,
const irep_idt &function_id,
Expand Down
8 changes: 4 additions & 4 deletions src/goto-programs/goto_function.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class goto_functiont
goto_programt body;

/// The type of the function, indicating the return type and parameter types
DEPRECATED("Get the type from the symbol table instead")
DEPRECATED(SINCE(2019, 2, 16, "Get the type from the symbol table instead"))
code_typet type;

typedef std::vector<irep_idt> parameter_identifierst;
Expand All @@ -54,19 +54,19 @@ class goto_functiont
parameter_identifiers.push_back(parameter.get_identifier());
}

DEPRECATED("Get the type from the symbol table instead")
DEPRECATED(SINCE(2019, 2, 16, "Get the type from the symbol table instead"))
bool is_inlined() const
{
return type.get_bool(ID_C_inlined);
}

DEPRECATED("Get the type from the symbol table instead")
DEPRECATED(SINCE(2019, 2, 16, "Get the type from the symbol table instead"))
bool is_hidden() const
{
return type.get_bool(ID_C_hide);
}

DEPRECATED("Get the type from the symbol table instead")
DEPRECATED(SINCE(2019, 2, 16, "Get the type from the symbol table instead"))
void make_hidden()
{
type.set(ID_C_hide, true);
Expand Down
49 changes: 29 additions & 20 deletions src/goto-programs/goto_program.h
Original file line number Diff line number Diff line change
Expand Up @@ -353,64 +353,71 @@ class goto_programt
clear(SKIP);
}

DEPRECATED("use goto_programt::make_return() instead")
DEPRECATED(SINCE(2019, 2, 13, "use goto_programt::make_return() instead"))
void make_return() { clear(RETURN); }

DEPRECATED("use goto_programt::make_skip() instead")
DEPRECATED(SINCE(2019, 2, 13, "use goto_programt::make_skip() instead"))
void make_skip() { clear(SKIP); }

DEPRECATED("use goto_programt::make_location() instead")
DEPRECATED(SINCE(2019, 2, 13, "use goto_programt::make_location() instead"))
void make_location(const source_locationt &l)
{ clear(LOCATION); source_location=l; }

DEPRECATED("use goto_programt::make_throw() instead")
DEPRECATED(SINCE(2019, 2, 13, "use goto_programt::make_throw() instead"))
void make_throw() { clear(THROW); }

DEPRECATED("use goto_programt::make_catch() instead")
DEPRECATED(SINCE(2019, 2, 13, "use goto_programt::make_catch() instead"))
void make_catch() { clear(CATCH); }

DEPRECATED("use goto_programt::make_assertion() instead")
DEPRECATED(
SINCE(2019, 2, 13, "use goto_programt::make_assertion() instead"))
void make_assertion(const exprt &g) { clear(ASSERT); guard=g; }

DEPRECATED("use goto_programt::make_assumption() instead")
DEPRECATED(
SINCE(2019, 2, 13, "use goto_programt::make_assumption() instead"))
void make_assumption(const exprt &g) { clear(ASSUME); guard=g; }

DEPRECATED("use goto_programt::make_assignment() instead")
DEPRECATED(
SINCE(2019, 2, 13, "use goto_programt::make_assignment() instead"))
void make_assignment() { clear(ASSIGN); }

DEPRECATED("use goto_programt::make_other() instead")
DEPRECATED(SINCE(2019, 2, 13, "use goto_programt::make_other() instead"))
void make_other(const codet &_code) { clear(OTHER); code=_code; }

DEPRECATED("use goto_programt::make_decl() instead")
DEPRECATED(SINCE(2019, 2, 13, "use goto_programt::make_decl() instead"))
void make_decl() { clear(DECL); }

DEPRECATED("use goto_programt::make_dead() instead")
DEPRECATED(SINCE(2019, 2, 13, "use goto_programt::make_dead() instead"))
void make_dead() { clear(DEAD); }

DEPRECATED("use goto_programt::make_atomic_begin() instead")
DEPRECATED(
SINCE(2019, 2, 13, "use goto_programt::make_atomic_begin() instead"))
void make_atomic_begin() { clear(ATOMIC_BEGIN); }

DEPRECATED("use goto_programt::make_atomic_end() instead")
DEPRECATED(
SINCE(2019, 2, 13, "use goto_programt::make_atomic_end() instead"))
void make_atomic_end() { clear(ATOMIC_END); }

DEPRECATED("use goto_programt::make_end_function() instead")
DEPRECATED(
SINCE(2019, 2, 13, "use goto_programt::make_end_function() instead"))
void make_end_function() { clear(END_FUNCTION); }

DEPRECATED("use goto_programt::make_incomplete_goto() instead")
DEPRECATED(
SINCE(2019, 2, 13, "use goto_programt::make_incomplete_goto() instead"))
void make_incomplete_goto(const code_gotot &_code)
{
clear(INCOMPLETE_GOTO);
code = _code;
}

DEPRECATED("use goto_programt::make_goto() instead")
DEPRECATED(SINCE(2019, 2, 13, "use goto_programt::make_goto() instead"))
void make_goto(targett _target)
{
clear(GOTO);
targets.push_back(_target);
}

DEPRECATED("use goto_programt::make_goto() instead")
DEPRECATED(SINCE(2019, 2, 13, "use goto_programt::make_goto() instead"))
void make_goto(targett _target, const exprt &g)
{
make_goto(_target);
Expand All @@ -425,21 +432,23 @@ class goto_programt
type = GOTO;
}

DEPRECATED("use goto_programt::make_assignment() instead")
DEPRECATED(
SINCE(2019, 2, 13, "use goto_programt::make_assignment() instead"))
void make_assignment(const code_assignt &_code)
{
clear(ASSIGN);
code=_code;
}

DEPRECATED("use goto_programt::make_decl() instead")
DEPRECATED(SINCE(2019, 2, 13, "use goto_programt::make_decl() instead"))
void make_decl(const code_declt &_code)
{
clear(DECL);
code=_code;
}

DEPRECATED("use goto_programt::make_function_call() instead")
DEPRECATED(
SINCE(2019, 2, 13, "use goto_programt::make_function_call() instead"))
void make_function_call(const code_function_callt &_code)
{
clear(FUNCTION_CALL);
Expand Down
2 changes: 1 addition & 1 deletion src/goto-programs/link_to_library.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class goto_modelt;
class message_handlert;
class symbol_tablet;

DEPRECATED("Use link_to_library(goto_model, ...) instead")
DEPRECATED(SINCE(2019, 2, 28, "Use link_to_library(goto_model, ...) instead"))
void link_to_library(
symbol_tablet &,
goto_functionst &,
Expand Down
2 changes: 1 addition & 1 deletion src/goto-symex/ssa_step.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class SSA_stept
{
}

DEPRECATED("Use output without ns param")
DEPRECATED(SINCE(2018, 4, 23, "Use output without ns param"))
void output(const namespacet &ns, std::ostream &out) const;

void output(std::ostream &out) const;
Expand Down
3 changes: 2 additions & 1 deletion src/solvers/strings/string_constraint_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ add_axioms_for_char_literal(const function_application_exprt &f);
/// \todo This function is underspecified, we do not compute the exact value
/// but over approximate it.
/// \deprecated This is Java specific and should be implemented in Java.
DEPRECATED("This is Java specific and should be implemented in Java")
DEPRECATED(SINCE(2017, 10, 5, "Java specific, should be implemented in Java"))
std::pair<exprt, string_constraintst> add_axioms_for_code_point_count(
symbol_generatort &fresh_symbol,
const function_application_exprt &f,
Expand All @@ -494,6 +494,7 @@ std::pair<exprt, string_constraintst> add_axioms_for_code_point_count(
/// argument code points and we approximate this by saying the result is
/// between index + offset and index + 2 * offset.
/// \deprecated This is Java specific and should be implemented in Java.
DEPRECATED(SINCE(2017, 10, 5, "Java specific, should be implemented in Java"))
std::pair<exprt, string_constraintst> add_axioms_for_offset_by_code_point(
symbol_generatort &fresh_symbol,
const function_application_exprt &f);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ std::pair<exprt, string_constraintst> add_axioms_for_compare_to(
/// \deprecated never tested
/// \param f: function application with one string argument
/// \return a string expression
DEPRECATED("never tested")
DEPRECATED(SINCE(2017, 10, 5, "never tested"))
std::pair<symbol_exprt, string_constraintst>
string_constraint_generatort::add_axioms_for_intern(
const function_application_exprt &f)
Expand Down
8 changes: 4 additions & 4 deletions src/solvers/strings/string_constraint_generator_insert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ std::pair<exprt, string_constraintst> add_axioms_for_insert(
/// \param array_pool: pool of arrays representing strings
/// \param ns: namespace
/// \return an expression
DEPRECATED("should convert the value to string and call insert")
DEPRECATED(SINCE(2017, 10, 5, "convert the value to string and call insert"))
std::pair<exprt, string_constraintst> add_axioms_for_insert_int(
symbol_generatort &fresh_symbol,
const function_application_exprt &f,
Expand All @@ -167,7 +167,7 @@ std::pair<exprt, string_constraintst> add_axioms_for_insert_int(
/// integer offset, and a Boolean
/// \param array_pool: pool of arrays representing strings
/// \return a new string expression
DEPRECATED("should convert the value to string and call insert")
DEPRECATED(SINCE(2017, 10, 5, "convert the value to string and call insert"))
std::pair<exprt, string_constraintst> add_axioms_for_insert_bool(
symbol_generatort &fresh_symbol,
const function_application_exprt &f,
Expand Down Expand Up @@ -219,7 +219,7 @@ std::pair<exprt, string_constraintst> add_axioms_for_insert_char(
/// \param array_pool: pool of arrays representing strings
/// \param ns: namespace
/// \return a string expression
DEPRECATED("should convert the value to string and call insert")
DEPRECATED(SINCE(2017, 10, 5, "convert the value to string and call insert"))
std::pair<exprt, string_constraintst> add_axioms_for_insert_double(
symbol_generatort &fresh_symbol,
const function_application_exprt &f,
Expand Down Expand Up @@ -248,7 +248,7 @@ std::pair<exprt, string_constraintst> add_axioms_for_insert_double(
/// \param array_pool: pool of arrays representing strings
/// \param ns: namespace
/// \return a new string expression
DEPRECATED("should convert the value to string and call insert")
DEPRECATED(SINCE(2017, 10, 5, "convert the value to string and call insert"))
std::pair<exprt, string_constraintst> add_axioms_for_insert_float(
symbol_generatort &fresh_symbol,
const function_application_exprt &f,
Expand Down
2 changes: 1 addition & 1 deletion src/solvers/strings/string_constraint_generator_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ string_constraint_generatort::add_axioms_for_function_application(
/// or three arguments: string, integer offset and count
/// \param array_pool: pool of arrays representing strings
/// \return a new string expression
DEPRECATED("should use substring instead")
DEPRECATED(SINCE(2017, 10, 5, "should use substring instead"))
std::pair<exprt, string_constraintst> add_axioms_for_copy(
symbol_generatort &fresh_symbol,
const function_application_exprt &f,
Expand Down
5 changes: 3 additions & 2 deletions src/solvers/strings/string_constraint_generator_testing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ std::pair<exprt, string_constraintst> add_axioms_for_is_prefix(
/// \param f: function application with a string argument
/// \param array_pool: pool of arrays representing strings
/// \return a Boolean expression
DEPRECATED("should use `string_length(s)==0` instead")
DEPRECATED(SINCE(2017, 10, 5, "should use `string_length s == 0` instead"))
std::pair<exprt, string_constraintst> add_axioms_for_is_empty(
symbol_generatort &fresh_symbol,
const function_application_exprt &f,
Expand Down Expand Up @@ -165,7 +165,8 @@ std::pair<exprt, string_constraintst> add_axioms_for_is_empty(
/// argument or the first argument
/// \param array_pool: pool of arrays representing strings
/// \return Boolean expression `issuffix`
DEPRECATED("should use `strings_startwith(s0, s1, s1.length - s0.length)`")
/// \deprecated Should use `strings_startwith(s0, s1, s1.length - s0.length)`.
DEPRECATED(SINCE(2018, 6, 6, "should use strings_startwith"))
std::pair<exprt, string_constraintst> add_axioms_for_is_suffix(
symbol_generatort &fresh_symbol,
const function_application_exprt &f,
Expand Down
8 changes: 4 additions & 4 deletions src/solvers/strings/string_constraint_generator_valueof.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static unsigned long to_integer_or_default(
/// \param array_pool: pool of arrays representing strings
/// \param ns: namespace
/// \return a new string expression
DEPRECATED("should use add_axioms_for_string_of_int instead")
DEPRECATED(SINCE(2017, 10, 5, "use add_axioms_for_string_of_int instead"))
std::pair<exprt, string_constraintst> add_axioms_from_long(
const function_application_exprt &f,
array_poolt &array_pool,
Expand All @@ -63,7 +63,7 @@ std::pair<exprt, string_constraintst> add_axioms_from_long(
/// \param f: function application with a Boolean argument
/// \param array_pool: pool of arrays representing strings
/// \return a new string expression
DEPRECATED("This is Java specific and should be implemented in Java instead")
DEPRECATED(SINCE(2017, 10, 5, "Java specific, should be implemented in Java"))
std::pair<exprt, string_constraintst> add_axioms_from_bool(
const function_application_exprt &f,
array_poolt &array_pool)
Expand All @@ -80,7 +80,7 @@ std::pair<exprt, string_constraintst> add_axioms_from_bool(
/// \param res: string expression for the result
/// \param b: Boolean expression
/// \return code 0 on success
DEPRECATED("This is Java specific and should be implemented in Java instead")
DEPRECATED(SINCE(2017, 10, 5, "Java specific, should be implemented in Java"))
std::pair<exprt, string_constraintst>
add_axioms_from_bool(const array_string_exprt &res, const exprt &b)
{
Expand Down Expand Up @@ -212,7 +212,7 @@ static exprt int_of_hex_char(const exprt &chr)
/// \param res: string expression for the result
/// \param i: an integer argument
/// \return code 0 on success
DEPRECATED("use add_axioms_for_string_of_int_with_radix instead")
DEPRECATED(SINCE(2017, 10, 5, "use add_axioms_for_string_of_int_with_radix"))
std::pair<exprt, string_constraintst>
add_axioms_from_int_hex(const array_string_exprt &res, const exprt &i)
{
Expand Down
2 changes: 1 addition & 1 deletion src/util/arith_tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class typet;
bool to_integer(const constant_exprt &expr, mp_integer &int_value);

// returns 'true' on error
DEPRECATED("Use numeric_cast<unsigned>(e) instead")
DEPRECATED(SINCE(2018, 9, 29, "Use numeric_cast<unsigned>(e) instead"))
bool to_unsigned_integer(const constant_exprt &expr, unsigned &uint_value);

/// Numerical cast provides a unified way of converting from one numerical type
Expand Down
4 changes: 2 additions & 2 deletions src/util/base_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ class exprt;
class typet;
class namespacet;

DEPRECATED("Use == instead")
DEPRECATED(SINCE(2019, 1, 22, "Use == instead"))
bool base_type_eq(
const typet &type1,
const typet &type2,
const namespacet &ns);

DEPRECATED("Use == instead")
DEPRECATED(SINCE(2019, 1, 22, "Use == instead"))
bool base_type_eq(
const exprt &expr1,
const exprt &expr2,
Expand Down
6 changes: 4 additions & 2 deletions src/util/byte_operators.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ Author: Daniel Kroening, kroening@kroening.com
class byte_extract_exprt:public binary_exprt
{
public:
DEPRECATED("use byte_extract_exprt(id, op, offset, type) instead")
DEPRECATED(
SINCE(2019, 1, 12, "use byte_extract_exprt(id, op, offset, type) instead"))
explicit byte_extract_exprt(irep_idt _id):binary_exprt(_id)
{
}

DEPRECATED("use byte_extract_exprt(id, op, offset, type) instead")
DEPRECATED(
SINCE(2019, 1, 12, "use byte_extract_exprt(id, op, offset, type) instead"))
explicit byte_extract_exprt(irep_idt _id, const typet &_type):
binary_exprt(_id, _type)
{
Expand Down
3 changes: 3 additions & 0 deletions src/util/deprecate.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@ Author: Diffblue Ltd.
#define DEPRECATED(msg)
#endif

#define SINCE(year, month, day, msg) \
"deprecated since " #year "-" #month "-" #day "; " msg

#endif // CPROVER_UTIL_DEPRECATE_H
18 changes: 13 additions & 5 deletions src/util/expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,22 @@ class exprt:public irept
void reserve_operands(operandst::size_type n)
{ operands().reserve(n) ; }

DEPRECATED("use add_to_operands(std::move(expr)) instead")
DEPRECATED(SINCE(2018, 10, 1, "use add_to_operands(std::move(expr)) instead"))
void move_to_operands(exprt &expr);

DEPRECATED("use add_to_operands(std::move(e1), std::move(e2)) instead")
DEPRECATED(SINCE(
2018,
10,
1,
"use add_to_operands(std::move(e1), std::move(e2)) instead"))
void move_to_operands(exprt &e1, exprt &e2);

DEPRECATED(
"use add_to_operands(std::move(e1), std::move(e2), std::move(e3)) instead")
DEPRECATED(SINCE(
2018,
10,
1,
"use add_to_operands(std::move(e1), std::move(e2), std::move(e3))"
"instead"))
void move_to_operands(exprt &e1, exprt &e2, exprt &e3);

/// Copy the given argument to the end of `exprt`'s operands.
Expand Down Expand Up @@ -225,7 +233,7 @@ class exprt:public irept
op.push_back(std::move(e3));
}

DEPRECATED("use typecast_exprt() instead")
DEPRECATED(SINCE(2019, 1, 19, "use typecast_exprt() instead"))
void make_typecast(const typet &_type);

void make_bool(bool value);
Expand Down
3 changes: 1 addition & 2 deletions src/util/lispexpr.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ Author: Daniel Kroening, kroening@kroening.com

\*******************************************************************/


// THIS HEADER IS DEPRECATED AND WILL GO AWAY
// THIS HEADER IS DEPRECATED (since 2015-06-30) AND WILL GO AWAY

#ifndef CPROVER_UTIL_LISPEXPR_H
#define CPROVER_UTIL_LISPEXPR_H
Expand Down
Loading