Skip to content

Commit

Permalink
added bug in atomicity analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
EkanshdeepGupta committed Nov 7, 2024
1 parent d0218e5 commit 0fbdd7c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/bugs/atomicity_check_ghost_field_bug.rav
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
field f1: Int
ghost field g1: Int

inv inv1() { true }

proc p1(x: Ref)
requires inv1()
requires exists nn:Int :: own(x, f1, nn, 1.0)
{
unfold inv1();
var f: Int := x.f1;

// ########
// Neither of the following succeed:
// a.)
x.g1 := 4;
//
// b.)
// {! x.g1 := 4; !}
//
// for similar reasons.
// ########

fold inv1();
}

0 comments on commit 0fbdd7c

Please sign in to comment.