Skip to content

Commit f8a2d4a

Browse files
committed
Change some struct mode
1 parent 1b84400 commit f8a2d4a

9 files changed

Lines changed: 29 additions & 7 deletions

File tree

File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Ghost resources availbe for use in proofs, based on previous resource algebras.
22
pub mod excl;
33
pub mod frac;
4-
pub mod sum;
4+
pub mod csum;
55
pub mod tokens;

vstd_extra/src/resource/pcm/agree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ verus! {
1111
///
1212
/// In modern Iris, it uses CMRA instead of PCM, which uses a core for every element instead of a unit element.
1313
/// Here we add a unit element to stick to the PCM definition.
14-
pub tracked enum AgreeR<A> {
14+
pub ghost enum AgreeR<A> {
1515
Unit,
1616
/// Agreement on a value.
1717
Agree(A),

vstd_extra/src/resource/pcm/csum.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Csum resource algebra
1+
//! Csum resource algebra.
22
//!
33
//! For Iris definition, see:
44
//! <https://gitlab.mpi-sws.org/iris/iris/-/blob/master/iris/algebra/csum.v>
@@ -11,7 +11,7 @@ verus! {
1111
///
1212
/// In modern Iris, it uses CMRA instead of PCM, which uses a core for every element instead of a unit element.
1313
/// Here we add a unit element to stick to the PCM definition.
14-
pub tracked enum CsumR<A, B> {
14+
pub ghost enum CsumR<A, B> {
1515
Unit,
1616
Cinl(A),
1717
Cinr(B),

vstd_extra/src/resource/pcm/frac.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ verus! {
1515

1616
/// Fractional PCM
1717
#[verifier::ext_equal]
18-
pub tracked enum FracR<T> {
18+
pub ghost enum FracR<T> {
1919
Unit,
2020
Frac(real, T),
2121
Invalid,
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//! Csum storage protocol.
2+
3+
use vstd::prelude::*;
4+
use vstd::pcm::Loc;
5+
use vstd::prelude::*;
6+
use vstd::storage_protocol::*;
7+
use crate::sum::*;
8+
9+
verus!{
10+
11+
/// The Csum storage protocol.
12+
pub ghost enum CsumP<A, B> {
13+
Unit,
14+
Cinl(A),
15+
Cinr(B),
16+
CsumInvalid,
17+
}
18+
19+
20+
21+
}

vstd_extra/src/resource/storage_protocol/frac.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ broadcast use group_map_axioms;
1010

1111
/// The fractional protocol monoid.
1212
#[verifier::ext_equal]
13-
pub tracked enum FracP<T> {
13+
pub ghost enum FracP<T> {
1414
Unit,
1515
Frac(real, T),
1616
Invalid,

vstd_extra/src/resource/storage_protocol/hybrid_product.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use vstd::storage_protocol::*;
77
verus! {
88

99
/// The hybrid product of a PCM and a storage-protocol resource algebra.
10-
pub tracked struct HybridProduct<P: PCM, S: Protocol<K, V>, K, V> {
10+
pub ghost struct HybridProduct<P: PCM, S: Protocol<K, V>, K, V> {
1111
pub pcm: P,
1212
pub protocol: S,
1313
/// A Rust compiler restriction.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
//! Definition of the Leaf-style storage protocol resource algebra.
2+
pub mod csum;
23
pub mod frac;
34
pub mod hybrid_product;

0 commit comments

Comments
 (0)