Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions regression/cbmc-concurrency/graphml_witness1/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
int global;

int main()
{
__CPROVER_ASYNC_1: global=1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest // Create thread to set global to 1 then exit

global=2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// Runs in main thread only ?

assert(global==2); // to fail
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// Fails if the spawned thread runs after the main

}
10 changes: 10 additions & 0 deletions regression/cbmc-concurrency/graphml_witness1/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CORE
main.c
--graphml-witness -
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
</graphml>
--
^warning: ignoring
2 changes: 1 addition & 1 deletion src/goto-programs/graphml_witness.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static bool filter_out(
goto_tracet::stepst::const_iterator &it)
{
if(it->hidden &&
(!it->is_assignment() ||
(!it->pc->is_assign() ||
to_code_assign(it->pc->code).rhs().id()!=ID_side_effect ||
to_code_assign(it->pc->code).rhs().get(ID_statement)!=ID_nondet))
return true;
Expand Down