Skip to content

Commit 917e11e

Browse files
lucasccordeirotautschnig
authored andcommitted
Add violation node for the memory safety benchmarks
1 parent 3274d1b commit 917e11e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/goto-programs/graphml_witness.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Author: Daniel Kroening
1717
#include <util/byte_operators.h>
1818
#include <util/c_types.h>
1919
#include <util/arith_tools.h>
20+
#include <util/cprover_prefix.h>
2021
#include <util/prefix.h>
2122
#include <util/ssa_expr.h>
2223
#include <util/std_pair_hash.h>
@@ -221,7 +222,11 @@ static bool filter_out(
221222
source_location.get_file().empty() ||
222223
source_location.is_built_in() ||
223224
source_location.get_line().empty())
224-
return true;
225+
{
226+
const irep_idt id=source_location.get_function();
227+
if(!(has_prefix(id2string(id), CPROVER_PREFIX) && it->is_assert()))
228+
return true;
229+
}
225230

226231
return false;
227232
}
@@ -337,6 +342,7 @@ void graphml_witnesst::operator()(const goto_tracet &goto_trace)
337342
graphml[node].line=source_location.get_line();
338343
graphml[node].is_violation=
339344
it->type==goto_trace_stept::typet::ASSERT && !it->cond_value;
345+
340346
graphml[node].has_invariant=false;
341347

342348
step_to_node[it->step_nr]=node;

0 commit comments

Comments
 (0)