Skip to content

Commit

Permalink
moved solved bug from bugs to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
EkanshdeepGupta committed Nov 7, 2024
1 parent 35707a7 commit 91bb68f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 26 deletions.
26 changes: 0 additions & 26 deletions test/bugs/atomicity_check_ghost_field_bug.rav

This file was deleted.

25 changes: 25 additions & 0 deletions test/ci/front-end/atomics/atomicity_check_ghost_fields_vars.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)
requires exists nn:Int :: own(x, g1, nn, 1.0)
{
unfold inv1();
ghost var gv0: Int := 0;

// This field read is the concrete atomic step
var f: Int := x.f1;

// The following commands are all allowed before folding the invariant,
// since they are all writes to ghost variables or ghost fields.
x.g1 := 4;
ghost var gv1: Int := 0;
gv0 := 1;
{! x.g1 := 4; gv1 := 2; !}

fold inv1();
}
2 changes: 2 additions & 0 deletions test/ci/front-end/atomics/atomicity_check_ghost_fields_vars.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
$ dune exec -- raven --shh ./atomicity_check_ghost_fields_vars.rav
Verification successful.

0 comments on commit 91bb68f

Please sign in to comment.