Skip to content

Commit

Permalink
Add a test for PtrOwn disjointness
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudgolfouse committed Dec 9, 2024
1 parent e5afa1f commit 26f39be
Show file tree
Hide file tree
Showing 4 changed files with 344 additions and 0 deletions.
317 changes: 317 additions & 0 deletions creusot/tests/should_succeed/ghost/disjoint_raw_ptr.coma

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions creusot/tests/should_succeed/ghost/disjoint_raw_ptr.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
extern crate creusot_contracts;
use creusot_contracts::{ptr_own::PtrOwn, *};

pub fn foo() {
let (p1, mut own1) = PtrOwn::new(1i32);
let (p2, own2) = PtrOwn::new(1i32);

ghost! {
let _ = PtrOwn::disjoint_lemma(*own1.borrow_mut(), *own2.borrow());
};
proof_assert!(own1 != own2);
proof_assert!(p1 != p2);
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

0 comments on commit 26f39be

Please sign in to comment.