Skip to content

Commit c472d62

Browse files
lucasccordeirotautschnig
authored andcommitted
Add violation node for the memory safety benchmarks
1 parent 0415b70 commit c472d62

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>
@@ -206,7 +207,11 @@ static bool filter_out(
206207
source_location.get_file().empty() ||
207208
source_location.is_built_in() ||
208209
source_location.get_line().empty())
209-
return true;
210+
{
211+
const irep_idt id=source_location.get_function();
212+
if(!(has_prefix(id2string(id), CPROVER_PREFIX) && it->is_assert()))
213+
return true;
214+
}
210215

211216
return false;
212217
}
@@ -322,6 +327,7 @@ void graphml_witnesst::operator()(const goto_tracet &goto_trace)
322327
graphml[node].line=source_location.get_line();
323328
graphml[node].is_violation=
324329
it->type==goto_trace_stept::typet::ASSERT && !it->cond_value;
330+
325331
graphml[node].has_invariant=false;
326332

327333
step_to_node[it->step_nr]=node;

0 commit comments

Comments
 (0)