Skip to content

Commit 08e9a79

Browse files
author
Remi Delmas
committed
CONTRACTS: havoc_utilst methods are now non-const
To support slice operators in loop assigns clauses the methods need to be non-const, since havocing a slice using havoc_slice will modify the symbol table.
1 parent c471312 commit 08e9a79

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/goto-instrument/havoc_utils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Date: July 2021
2020

2121
void havoc_utilst::append_full_havoc_code(
2222
const source_locationt location,
23-
goto_programt &dest) const
23+
goto_programt &dest)
2424
{
2525
for(const auto &expr : assigns)
2626
append_havoc_code_for_expr(location, expr, dest);
@@ -29,7 +29,7 @@ void havoc_utilst::append_full_havoc_code(
2929
void havoc_utilst::append_havoc_code_for_expr(
3030
const source_locationt location,
3131
const exprt &expr,
32-
goto_programt &dest) const
32+
goto_programt &dest)
3333
{
3434
if(expr.id() == ID_index || expr.id() == ID_dereference)
3535
{

src/goto-instrument/havoc_utils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class havoc_utilst
6060
/// \param dest The destination goto program to append the instructions to
6161
void append_full_havoc_code(
6262
const source_locationt location,
63-
goto_programt &dest) const;
63+
goto_programt &dest);
6464

6565
/// \brief Append goto instructions to havoc a single expression `expr`
6666
///
@@ -76,7 +76,7 @@ class havoc_utilst
7676
virtual void append_havoc_code_for_expr(
7777
const source_locationt location,
7878
const exprt &expr,
79-
goto_programt &dest) const;
79+
goto_programt &dest);
8080

8181
/// \brief Append goto instructions to havoc the underlying object of `expr`
8282
///

0 commit comments

Comments
 (0)