Skip to content

Commit 963b9af

Browse files
authored
Merge pull request #4427 from tautschnig/remove-long-deprecated-methods
Remove long deprecated methods
2 parents 963cdc4 + d794d17 commit 963b9af

File tree

10 files changed

+6
-330
lines changed

10 files changed

+6
-330
lines changed

src/goto-harness/recursive_initialization.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ void recursive_initializationt::initialize_nondet(
164164
lhs.id() != ID_symbol ||
165165
!is_array_size_parameter(to_symbol_expr(lhs).get_identifier()))
166166
{
167-
body.add(code_assignt{lhs, side_effect_expr_nondett{lhs.type()}});
167+
body.add(code_assignt{
168+
lhs, side_effect_expr_nondett{lhs.type(), source_locationt{}}});
168169
}
169170
}
170171

src/goto-instrument/cover.cpp

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ Date: May 2016
1818
#include <util/make_unique.h>
1919
#include <util/cmdline.h>
2020
#include <util/options.h>
21-
#include <util/deprecate.h>
2221

2322
#include <goto-programs/remove_skip.h>
2423

@@ -49,33 +48,6 @@ void instrument_cover_goals(
4948
instrumenters(function_id, goto_program, *basic_blocks);
5049
}
5150

52-
/// Instruments goto program for a given coverage criterion
53-
/// \param symbol_table: the symbol table
54-
/// \param function_id: name of \p goto_program
55-
/// \param goto_program: the goto program
56-
/// \param criterion: the coverage criterion
57-
/// \param message_handler: a message handler
58-
/// \deprecated use instrument_cover_goals(goto_programt &goto_program,
59-
/// const cover_instrumenterst &instrumenters,
60-
/// message_handlert &message_handler, const irep_idt mode) instead
61-
DEPRECATED(SINCE(2018, 2, 9, "use instrument_cover_goals goto_programt &..."))
62-
void instrument_cover_goals(
63-
const symbol_tablet &symbol_table,
64-
const irep_idt &function_id,
65-
goto_programt &goto_program,
66-
coverage_criteriont criterion,
67-
message_handlert &message_handler)
68-
{
69-
goal_filterst goal_filters;
70-
goal_filters.add(util_make_unique<internal_goals_filtert>(message_handler));
71-
72-
cover_instrumenterst instrumenters;
73-
instrumenters.add_from_criterion(criterion, symbol_table, goal_filters);
74-
75-
instrument_cover_goals(
76-
function_id, goto_program, instrumenters, ID_unknown, message_handler);
77-
}
78-
7951
/// Create and add an instrumenter based on the given criterion
8052
/// \param criterion: the coverage criterion
8153
/// \param symbol_table: the symbol table

src/goto-symex/ssa_step.cpp

Lines changed: 1 addition & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -7,120 +7,8 @@ Author: Romain Brenguier <[email protected]>
77
*******************************************************************/
88

99
#include "ssa_step.h"
10-
#include <langapi/language_util.h>
11-
#include <util/format_expr.h>
12-
13-
void SSA_stept::output(const namespacet &ns, std::ostream &out) const
14-
{
15-
out << "Thread " << source.thread_nr;
16-
17-
if(source.pc->source_location.is_not_nil())
18-
out << " " << source.pc->source_location << '\n';
19-
else
20-
out << '\n';
2110

22-
switch(type)
23-
{
24-
case goto_trace_stept::typet::ASSERT:
25-
out << "ASSERT " << from_expr(ns, source.function_id, cond_expr) << '\n';
26-
break;
27-
case goto_trace_stept::typet::ASSUME:
28-
out << "ASSUME " << from_expr(ns, source.function_id, cond_expr) << '\n';
29-
break;
30-
case goto_trace_stept::typet::LOCATION:
31-
out << "LOCATION" << '\n';
32-
break;
33-
case goto_trace_stept::typet::INPUT:
34-
out << "INPUT" << '\n';
35-
break;
36-
case goto_trace_stept::typet::OUTPUT:
37-
out << "OUTPUT" << '\n';
38-
break;
39-
40-
case goto_trace_stept::typet::DECL:
41-
out << "DECL" << '\n';
42-
out << from_expr(ns, source.function_id, ssa_lhs) << '\n';
43-
break;
44-
45-
case goto_trace_stept::typet::ASSIGNMENT:
46-
out << "ASSIGNMENT (";
47-
switch(assignment_type)
48-
{
49-
case symex_targett::assignment_typet::HIDDEN:
50-
out << "HIDDEN";
51-
break;
52-
case symex_targett::assignment_typet::STATE:
53-
out << "STATE";
54-
break;
55-
case symex_targett::assignment_typet::VISIBLE_ACTUAL_PARAMETER:
56-
out << "VISIBLE_ACTUAL_PARAMETER";
57-
break;
58-
case symex_targett::assignment_typet::HIDDEN_ACTUAL_PARAMETER:
59-
out << "HIDDEN_ACTUAL_PARAMETER";
60-
break;
61-
case symex_targett::assignment_typet::PHI:
62-
out << "PHI";
63-
break;
64-
case symex_targett::assignment_typet::GUARD:
65-
out << "GUARD";
66-
break;
67-
default:
68-
{
69-
}
70-
}
71-
72-
out << ")\n";
73-
break;
74-
75-
case goto_trace_stept::typet::DEAD:
76-
out << "DEAD\n";
77-
break;
78-
case goto_trace_stept::typet::FUNCTION_CALL:
79-
out << "FUNCTION_CALL\n";
80-
break;
81-
case goto_trace_stept::typet::FUNCTION_RETURN:
82-
out << "FUNCTION_RETURN\n";
83-
break;
84-
case goto_trace_stept::typet::CONSTRAINT:
85-
out << "CONSTRAINT\n";
86-
break;
87-
case goto_trace_stept::typet::SHARED_READ:
88-
out << "SHARED READ\n";
89-
break;
90-
case goto_trace_stept::typet::SHARED_WRITE:
91-
out << "SHARED WRITE\n";
92-
break;
93-
case goto_trace_stept::typet::ATOMIC_BEGIN:
94-
out << "ATOMIC_BEGIN\n";
95-
break;
96-
case goto_trace_stept::typet::ATOMIC_END:
97-
out << "AUTOMIC_END\n";
98-
break;
99-
case goto_trace_stept::typet::SPAWN:
100-
out << "SPAWN\n";
101-
break;
102-
case goto_trace_stept::typet::MEMORY_BARRIER:
103-
out << "MEMORY_BARRIER\n";
104-
break;
105-
case goto_trace_stept::typet::GOTO:
106-
out << "IF " << from_expr(ns, source.function_id, cond_expr) << " GOTO\n";
107-
break;
108-
109-
default:
110-
UNREACHABLE;
111-
}
112-
113-
if(is_assert() || is_assume() || is_assignment() || is_constraint())
114-
out << from_expr(ns, source.function_id, cond_expr) << '\n';
115-
116-
if(is_assert() || is_constraint())
117-
out << comment << '\n';
118-
119-
if(is_shared_read() || is_shared_write())
120-
out << from_expr(ns, source.function_id, ssa_lhs) << '\n';
121-
122-
out << "Guard: " << from_expr(ns, source.function_id, guard) << '\n';
123-
}
11+
#include <util/format_expr.h>
12412

12513
void SSA_stept::output(std::ostream &out) const
12614
{

src/goto-symex/ssa_step.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,6 @@ class SSA_stept
191191
{
192192
}
193193

194-
DEPRECATED(SINCE(2018, 4, 23, "Use output without ns param"))
195-
void output(const namespacet &ns, std::ostream &out) const;
196-
197194
void output(std::ostream &out) const;
198195

199196
void validate(const namespacet &ns, const validation_modet vm) const;

src/goto-symex/symex_target_equation.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ Author: Daniel Kroening, [email protected]
1717
#include <util/throw_with_nested.h>
1818
#include <util/unwrap_nested_exception.h>
1919

20-
// Can be removed once deprecated SSA_stept::output is removed
21-
#include <langapi/language_util.h>
22-
2320
#include <solvers/flattening/bv_conversion_exceptions.h>
2421
#include <solvers/prop/literal_expr.h>
2522
#include <solvers/prop/prop.h>
@@ -682,13 +679,11 @@ void symex_target_equationt::merge_ireps(SSA_stept &SSA_step)
682679
// converted_io_args is merged in convert_io
683680
}
684681

685-
void symex_target_equationt::output(
686-
std::ostream &out,
687-
const namespacet &ns) const
682+
void symex_target_equationt::output(std::ostream &out) const
688683
{
689684
for(const auto &step : SSA_steps)
690685
{
691-
step.output(ns, out);
686+
step.output(out);
692687
out << "--------------\n";
693688
}
694689
}

src/goto-symex/symex_target_equation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ class symex_target_equationt:public symex_targett
255255
return it;
256256
}
257257

258-
void output(std::ostream &out, const namespacet &ns) const;
258+
void output(std::ostream &out) const;
259259

260260
void clear()
261261
{

src/util/mp_arith.cpp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -186,28 +186,6 @@ const mp_integer binary2integer(const std::string &n, bool is_signed)
186186
#endif
187187
}
188188

189-
mp_integer::ullong_t integer2ulong(const mp_integer &n)
190-
{
191-
PRECONDITION(n.is_ulong());
192-
return n.to_ulong();
193-
}
194-
195-
std::size_t integer2size_t(const mp_integer &n)
196-
{
197-
PRECONDITION(n>=0 && n<=std::numeric_limits<std::size_t>::max());
198-
PRECONDITION(n.is_ulong());
199-
mp_integer::ullong_t ull = n.to_ulong();
200-
return (std::size_t) ull;
201-
}
202-
203-
unsigned integer2unsigned(const mp_integer &n)
204-
{
205-
PRECONDITION(n>=0 && n<=std::numeric_limits<unsigned>::max());
206-
PRECONDITION(n.is_ulong());
207-
mp_integer::ullong_t ull = n.to_ulong();
208-
return (unsigned)ull;
209-
}
210-
211189
/// bitwise binary operation over two integers, given as a functor
212190
/// \param a: the first integer
213191
/// \param b: the second integer

src/util/mp_arith.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Author: Daniel Kroening, [email protected]
1414
#include <string>
1515

1616
#include "big-int/bigint.hh"
17-
#include "deprecate.h"
1817

1918
// NOLINTNEXTLINE(readability/identifiers)
2019
typedef BigInt mp_integer;
@@ -49,17 +48,4 @@ const mp_integer string2integer(const std::string &, unsigned base=10);
4948
const std::string integer2binary(const mp_integer &, std::size_t width);
5049
const mp_integer binary2integer(const std::string &, bool is_signed);
5150

52-
/// \deprecated use numeric_cast_v<unsigned long long> instead
53-
DEPRECATED(
54-
SINCE(2017, 11, 13, "Use numeric_cast_v<unsigned long long> instead"))
55-
mp_integer::ullong_t integer2ulong(const mp_integer &);
56-
57-
/// \deprecated use numeric_cast_v<std::size_t> instead
58-
DEPRECATED(SINCE(2017, 11, 13, "Use numeric_cast_v<std::size_t> instead"))
59-
std::size_t integer2size_t(const mp_integer &);
60-
61-
/// \deprecated use numeric_cast_v<unsigned> instead
62-
DEPRECATED(SINCE(2017, 11, 13, "Use numeric_cast_v<unsigned> instead"))
63-
unsigned integer2unsigned(const mp_integer &);
64-
6551
#endif // CPROVER_UTIL_MP_ARITH_H

0 commit comments

Comments
 (0)