Skip to content

Commit 6d0177b

Browse files
authored
Merge pull request #4423 from tautschnig/deprecated-dates
Add the deprecation date to each deprecated entity [blocks: #3768, #4248, #4368, #4371]
2 parents 8234610 + e70dcf2 commit 6d0177b

25 files changed

+264
-187
lines changed

src/goto-instrument/cover.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void instrument_cover_goals(
5858
/// \deprecated use instrument_cover_goals(goto_programt &goto_program,
5959
/// const cover_instrumenterst &instrumenters,
6060
/// message_handlert &message_handler, const irep_idt mode) instead
61-
DEPRECATED("use instrument_cover_goals(goto_programt &...) instead")
61+
DEPRECATED(SINCE(2018, 2, 9, "use instrument_cover_goals goto_programt &..."))
6262
void instrument_cover_goals(
6363
const symbol_tablet &symbol_table,
6464
const irep_idt &function_id,

src/goto-programs/goto_function.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class goto_functiont
3030
goto_programt body;
3131

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

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

57-
DEPRECATED("Get the type from the symbol table instead")
57+
DEPRECATED(SINCE(2019, 2, 16, "Get the type from the symbol table instead"))
5858
bool is_inlined() const
5959
{
6060
return type.get_bool(ID_C_inlined);
6161
}
6262

63-
DEPRECATED("Get the type from the symbol table instead")
63+
DEPRECATED(SINCE(2019, 2, 16, "Get the type from the symbol table instead"))
6464
bool is_hidden() const
6565
{
6666
return type.get_bool(ID_C_hide);
6767
}
6868

69-
DEPRECATED("Get the type from the symbol table instead")
69+
DEPRECATED(SINCE(2019, 2, 16, "Get the type from the symbol table instead"))
7070
void make_hidden()
7171
{
7272
type.set(ID_C_hide, true);

src/goto-programs/goto_program.h

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -353,64 +353,71 @@ class goto_programt
353353
clear(SKIP);
354354
}
355355

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

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

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

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

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

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

375-
DEPRECATED("use goto_programt::make_assumption() instead")
376+
DEPRECATED(
377+
SINCE(2019, 2, 13, "use goto_programt::make_assumption() instead"))
376378
void make_assumption(const exprt &g) { clear(ASSUME); guard=g; }
377379

378-
DEPRECATED("use goto_programt::make_assignment() instead")
380+
DEPRECATED(
381+
SINCE(2019, 2, 13, "use goto_programt::make_assignment() instead"))
379382
void make_assignment() { clear(ASSIGN); }
380383

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

384-
DEPRECATED("use goto_programt::make_decl() instead")
387+
DEPRECATED(SINCE(2019, 2, 13, "use goto_programt::make_decl() instead"))
385388
void make_decl() { clear(DECL); }
386389

387-
DEPRECATED("use goto_programt::make_dead() instead")
390+
DEPRECATED(SINCE(2019, 2, 13, "use goto_programt::make_dead() instead"))
388391
void make_dead() { clear(DEAD); }
389392

390-
DEPRECATED("use goto_programt::make_atomic_begin() instead")
393+
DEPRECATED(
394+
SINCE(2019, 2, 13, "use goto_programt::make_atomic_begin() instead"))
391395
void make_atomic_begin() { clear(ATOMIC_BEGIN); }
392396

393-
DEPRECATED("use goto_programt::make_atomic_end() instead")
397+
DEPRECATED(
398+
SINCE(2019, 2, 13, "use goto_programt::make_atomic_end() instead"))
394399
void make_atomic_end() { clear(ATOMIC_END); }
395400

396-
DEPRECATED("use goto_programt::make_end_function() instead")
401+
DEPRECATED(
402+
SINCE(2019, 2, 13, "use goto_programt::make_end_function() instead"))
397403
void make_end_function() { clear(END_FUNCTION); }
398404

399-
DEPRECATED("use goto_programt::make_incomplete_goto() instead")
405+
DEPRECATED(
406+
SINCE(2019, 2, 13, "use goto_programt::make_incomplete_goto() instead"))
400407
void make_incomplete_goto(const code_gotot &_code)
401408
{
402409
clear(INCOMPLETE_GOTO);
403410
code = _code;
404411
}
405412

406-
DEPRECATED("use goto_programt::make_goto() instead")
413+
DEPRECATED(SINCE(2019, 2, 13, "use goto_programt::make_goto() instead"))
407414
void make_goto(targett _target)
408415
{
409416
clear(GOTO);
410417
targets.push_back(_target);
411418
}
412419

413-
DEPRECATED("use goto_programt::make_goto() instead")
420+
DEPRECATED(SINCE(2019, 2, 13, "use goto_programt::make_goto() instead"))
414421
void make_goto(targett _target, const exprt &g)
415422
{
416423
make_goto(_target);
@@ -425,21 +432,23 @@ class goto_programt
425432
type = GOTO;
426433
}
427434

428-
DEPRECATED("use goto_programt::make_assignment() instead")
435+
DEPRECATED(
436+
SINCE(2019, 2, 13, "use goto_programt::make_assignment() instead"))
429437
void make_assignment(const code_assignt &_code)
430438
{
431439
clear(ASSIGN);
432440
code=_code;
433441
}
434442

435-
DEPRECATED("use goto_programt::make_decl() instead")
443+
DEPRECATED(SINCE(2019, 2, 13, "use goto_programt::make_decl() instead"))
436444
void make_decl(const code_declt &_code)
437445
{
438446
clear(DECL);
439447
code=_code;
440448
}
441449

442-
DEPRECATED("use goto_programt::make_function_call() instead")
450+
DEPRECATED(
451+
SINCE(2019, 2, 13, "use goto_programt::make_function_call() instead"))
443452
void make_function_call(const code_function_callt &_code)
444453
{
445454
clear(FUNCTION_CALL);

src/goto-programs/link_to_library.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class goto_modelt;
2323
class message_handlert;
2424
class symbol_tablet;
2525

26-
DEPRECATED("Use link_to_library(goto_model, ...) instead")
26+
DEPRECATED(SINCE(2019, 2, 28, "Use link_to_library(goto_model, ...) instead"))
2727
void link_to_library(
2828
symbol_tablet &,
2929
goto_functionst &,

src/goto-symex/ssa_step.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ class SSA_stept
191191
{
192192
}
193193

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

197197
void output(std::ostream &out) const;

src/solvers/strings/string_constraint_generator.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ add_axioms_for_char_literal(const function_application_exprt &f);
482482
/// \todo This function is underspecified, we do not compute the exact value
483483
/// but over approximate it.
484484
/// \deprecated This is Java specific and should be implemented in Java.
485-
DEPRECATED("This is Java specific and should be implemented in Java")
485+
DEPRECATED(SINCE(2017, 10, 5, "Java specific, should be implemented in Java"))
486486
std::pair<exprt, string_constraintst> add_axioms_for_code_point_count(
487487
symbol_generatort &fresh_symbol,
488488
const function_application_exprt &f,
@@ -494,6 +494,7 @@ std::pair<exprt, string_constraintst> add_axioms_for_code_point_count(
494494
/// argument code points and we approximate this by saying the result is
495495
/// between index + offset and index + 2 * offset.
496496
/// \deprecated This is Java specific and should be implemented in Java.
497+
DEPRECATED(SINCE(2017, 10, 5, "Java specific, should be implemented in Java"))
497498
std::pair<exprt, string_constraintst> add_axioms_for_offset_by_code_point(
498499
symbol_generatort &fresh_symbol,
499500
const function_application_exprt &f);

src/solvers/strings/string_constraint_generator_comparison.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ std::pair<exprt, string_constraintst> add_axioms_for_compare_to(
303303
/// \deprecated never tested
304304
/// \param f: function application with one string argument
305305
/// \return a string expression
306-
DEPRECATED("never tested")
306+
DEPRECATED(SINCE(2017, 10, 5, "never tested"))
307307
std::pair<symbol_exprt, string_constraintst>
308308
string_constraint_generatort::add_axioms_for_intern(
309309
const function_application_exprt &f)

src/solvers/strings/string_constraint_generator_insert.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ std::pair<exprt, string_constraintst> add_axioms_for_insert(
140140
/// \param array_pool: pool of arrays representing strings
141141
/// \param ns: namespace
142142
/// \return an expression
143-
DEPRECATED("should convert the value to string and call insert")
143+
DEPRECATED(SINCE(2017, 10, 5, "convert the value to string and call insert"))
144144
std::pair<exprt, string_constraintst> add_axioms_for_insert_int(
145145
symbol_generatort &fresh_symbol,
146146
const function_application_exprt &f,
@@ -167,7 +167,7 @@ std::pair<exprt, string_constraintst> add_axioms_for_insert_int(
167167
/// integer offset, and a Boolean
168168
/// \param array_pool: pool of arrays representing strings
169169
/// \return a new string expression
170-
DEPRECATED("should convert the value to string and call insert")
170+
DEPRECATED(SINCE(2017, 10, 5, "convert the value to string and call insert"))
171171
std::pair<exprt, string_constraintst> add_axioms_for_insert_bool(
172172
symbol_generatort &fresh_symbol,
173173
const function_application_exprt &f,
@@ -219,7 +219,7 @@ std::pair<exprt, string_constraintst> add_axioms_for_insert_char(
219219
/// \param array_pool: pool of arrays representing strings
220220
/// \param ns: namespace
221221
/// \return a string expression
222-
DEPRECATED("should convert the value to string and call insert")
222+
DEPRECATED(SINCE(2017, 10, 5, "convert the value to string and call insert"))
223223
std::pair<exprt, string_constraintst> add_axioms_for_insert_double(
224224
symbol_generatort &fresh_symbol,
225225
const function_application_exprt &f,
@@ -248,7 +248,7 @@ std::pair<exprt, string_constraintst> add_axioms_for_insert_double(
248248
/// \param array_pool: pool of arrays representing strings
249249
/// \param ns: namespace
250250
/// \return a new string expression
251-
DEPRECATED("should convert the value to string and call insert")
251+
DEPRECATED(SINCE(2017, 10, 5, "convert the value to string and call insert"))
252252
std::pair<exprt, string_constraintst> add_axioms_for_insert_float(
253253
symbol_generatort &fresh_symbol,
254254
const function_application_exprt &f,

src/solvers/strings/string_constraint_generator_main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ string_constraint_generatort::add_axioms_for_function_application(
487487
/// or three arguments: string, integer offset and count
488488
/// \param array_pool: pool of arrays representing strings
489489
/// \return a new string expression
490-
DEPRECATED("should use substring instead")
490+
DEPRECATED(SINCE(2017, 10, 5, "should use substring instead"))
491491
std::pair<exprt, string_constraintst> add_axioms_for_copy(
492492
symbol_generatort &fresh_symbol,
493493
const function_application_exprt &f,

src/solvers/strings/string_constraint_generator_testing.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ std::pair<exprt, string_constraintst> add_axioms_for_is_prefix(
123123
/// \param f: function application with a string argument
124124
/// \param array_pool: pool of arrays representing strings
125125
/// \return a Boolean expression
126-
DEPRECATED("should use `string_length(s)==0` instead")
126+
DEPRECATED(SINCE(2017, 10, 5, "should use `string_length s == 0` instead"))
127127
std::pair<exprt, string_constraintst> add_axioms_for_is_empty(
128128
symbol_generatort &fresh_symbol,
129129
const function_application_exprt &f,
@@ -165,7 +165,8 @@ std::pair<exprt, string_constraintst> add_axioms_for_is_empty(
165165
/// argument or the first argument
166166
/// \param array_pool: pool of arrays representing strings
167167
/// \return Boolean expression `issuffix`
168-
DEPRECATED("should use `strings_startwith(s0, s1, s1.length - s0.length)`")
168+
/// \deprecated Should use `strings_startwith(s0, s1, s1.length - s0.length)`.
169+
DEPRECATED(SINCE(2018, 6, 6, "should use strings_startwith"))
169170
std::pair<exprt, string_constraintst> add_axioms_for_is_suffix(
170171
symbol_generatort &fresh_symbol,
171172
const function_application_exprt &f,

src/solvers/strings/string_constraint_generator_valueof.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static unsigned long to_integer_or_default(
4242
/// \param array_pool: pool of arrays representing strings
4343
/// \param ns: namespace
4444
/// \return a new string expression
45-
DEPRECATED("should use add_axioms_for_string_of_int instead")
45+
DEPRECATED(SINCE(2017, 10, 5, "use add_axioms_for_string_of_int instead"))
4646
std::pair<exprt, string_constraintst> add_axioms_from_long(
4747
const function_application_exprt &f,
4848
array_poolt &array_pool,
@@ -63,7 +63,7 @@ std::pair<exprt, string_constraintst> add_axioms_from_long(
6363
/// \param f: function application with a Boolean argument
6464
/// \param array_pool: pool of arrays representing strings
6565
/// \return a new string expression
66-
DEPRECATED("This is Java specific and should be implemented in Java instead")
66+
DEPRECATED(SINCE(2017, 10, 5, "Java specific, should be implemented in Java"))
6767
std::pair<exprt, string_constraintst> add_axioms_from_bool(
6868
const function_application_exprt &f,
6969
array_poolt &array_pool)
@@ -80,7 +80,7 @@ std::pair<exprt, string_constraintst> add_axioms_from_bool(
8080
/// \param res: string expression for the result
8181
/// \param b: Boolean expression
8282
/// \return code 0 on success
83-
DEPRECATED("This is Java specific and should be implemented in Java instead")
83+
DEPRECATED(SINCE(2017, 10, 5, "Java specific, should be implemented in Java"))
8484
std::pair<exprt, string_constraintst>
8585
add_axioms_from_bool(const array_string_exprt &res, const exprt &b)
8686
{
@@ -212,7 +212,7 @@ static exprt int_of_hex_char(const exprt &chr)
212212
/// \param res: string expression for the result
213213
/// \param i: an integer argument
214214
/// \return code 0 on success
215-
DEPRECATED("use add_axioms_for_string_of_int_with_radix instead")
215+
DEPRECATED(SINCE(2017, 10, 5, "use add_axioms_for_string_of_int_with_radix"))
216216
std::pair<exprt, string_constraintst>
217217
add_axioms_from_int_hex(const array_string_exprt &res, const exprt &i)
218218
{

src/util/arith_tools.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class typet;
2727
bool to_integer(const constant_exprt &expr, mp_integer &int_value);
2828

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

3333
/// Numerical cast provides a unified way of converting from one numerical type

src/util/base_type.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ class exprt;
1818
class typet;
1919
class namespacet;
2020

21-
DEPRECATED("Use == instead")
21+
DEPRECATED(SINCE(2019, 1, 22, "Use == instead"))
2222
bool base_type_eq(
2323
const typet &type1,
2424
const typet &type2,
2525
const namespacet &ns);
2626

27-
DEPRECATED("Use == instead")
27+
DEPRECATED(SINCE(2019, 1, 22, "Use == instead"))
2828
bool base_type_eq(
2929
const exprt &expr1,
3030
const exprt &expr2,

src/util/byte_operators.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@ Author: Daniel Kroening, [email protected]
2525
class byte_extract_exprt:public binary_exprt
2626
{
2727
public:
28-
DEPRECATED("use byte_extract_exprt(id, op, offset, type) instead")
28+
DEPRECATED(
29+
SINCE(2019, 1, 12, "use byte_extract_exprt(id, op, offset, type) instead"))
2930
explicit byte_extract_exprt(irep_idt _id):binary_exprt(_id)
3031
{
3132
}
3233

33-
DEPRECATED("use byte_extract_exprt(id, op, offset, type) instead")
34+
DEPRECATED(
35+
SINCE(2019, 1, 12, "use byte_extract_exprt(id, op, offset, type) instead"))
3436
explicit byte_extract_exprt(irep_idt _id, const typet &_type):
3537
binary_exprt(_id, _type)
3638
{

src/util/deprecate.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,7 @@ Author: Diffblue Ltd.
2323
#define DEPRECATED(msg)
2424
#endif
2525

26+
#define SINCE(year, month, day, msg) \
27+
"deprecated since " #year "-" #month "-" #day "; " msg
28+
2629
#endif // CPROVER_UTIL_DEPRECATE_H

src/util/expr.h

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,22 @@ class exprt:public irept
121121
void reserve_operands(operandst::size_type n)
122122
{ operands().reserve(n) ; }
123123

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

127-
DEPRECATED("use add_to_operands(std::move(e1), std::move(e2)) instead")
127+
DEPRECATED(SINCE(
128+
2018,
129+
10,
130+
1,
131+
"use add_to_operands(std::move(e1), std::move(e2)) instead"))
128132
void move_to_operands(exprt &e1, exprt &e2);
129133

130-
DEPRECATED(
131-
"use add_to_operands(std::move(e1), std::move(e2), std::move(e3)) instead")
134+
DEPRECATED(SINCE(
135+
2018,
136+
10,
137+
1,
138+
"use add_to_operands(std::move(e1), std::move(e2), std::move(e3))"
139+
"instead"))
132140
void move_to_operands(exprt &e1, exprt &e2, exprt &e3);
133141

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

228-
DEPRECATED("use typecast_exprt() instead")
236+
DEPRECATED(SINCE(2019, 1, 19, "use typecast_exprt() instead"))
229237
void make_typecast(const typet &_type);
230238

231239
void make_bool(bool value);

src/util/lispexpr.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

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

1211
#ifndef CPROVER_UTIL_LISPEXPR_H
1312
#define CPROVER_UTIL_LISPEXPR_H

0 commit comments

Comments
 (0)