pub trait DeepModel {
type DeepModelTy;
// Required method
fn deep_model(self) -> Self::DeepModelTy;
}
Expand description
The deep model corresponds to the model used for specifying operations such as equality, hash function or ordering, which are computed deeply in a data structure. Typically, such a model recursively calls deep models of inner types.
Required Associated Types§
type DeepModelTy
Required Methods§
Sourcefn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
Implementations on Foreign Types§
Source§impl DeepModel for bool
impl DeepModel for bool
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
self
type DeepModelTy = bool
Source§impl DeepModel for char
impl DeepModel for char
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
Source§impl DeepModel for i8
impl DeepModel for i8
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
Source§impl DeepModel for i16
impl DeepModel for i16
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
Source§impl DeepModel for i32
impl DeepModel for i32
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
Source§impl DeepModel for i64
impl DeepModel for i64
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
Source§impl DeepModel for i128
impl DeepModel for i128
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
Source§impl DeepModel for isize
impl DeepModel for isize
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
Source§impl DeepModel for u8
impl DeepModel for u8
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
Source§impl DeepModel for u16
impl DeepModel for u16
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
Source§impl DeepModel for u32
impl DeepModel for u32
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
Source§impl DeepModel for u64
impl DeepModel for u64
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
Source§impl DeepModel for u128
impl DeepModel for u128
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
Source§impl DeepModel for ()
impl DeepModel for ()
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { () }
type DeepModelTy = ()
Source§impl DeepModel for usize
impl DeepModel for usize
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
Source§impl DeepModel for BigRational
impl DeepModel for BigRational
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic ⚠
type DeepModelTy = Real
Source§impl<A: DeepModel> DeepModel for (A,)
impl<A: DeepModel> DeepModel for (A,)
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy,)
Source§impl<A: DeepModel, B: DeepModel> DeepModel for (A, B)
impl<A: DeepModel, B: DeepModel> DeepModel for (A, B)
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy, <B as DeepModel>::DeepModelTy)
Source§impl<A: DeepModel, B: DeepModel, C: DeepModel> DeepModel for (A, B, C)
impl<A: DeepModel, B: DeepModel, C: DeepModel> DeepModel for (A, B, C)
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy, <B as DeepModel>::DeepModelTy, <C as DeepModel>::DeepModelTy)
Source§impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel> DeepModel for (A, B, C, D)
impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel> DeepModel for (A, B, C, D)
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy, <B as DeepModel>::DeepModelTy, <C as DeepModel>::DeepModelTy, <D as DeepModel>::DeepModelTy)
Source§impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel> DeepModel for (A, B, C, D, E)
impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel> DeepModel for (A, B, C, D, E)
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy, <B as DeepModel>::DeepModelTy, <C as DeepModel>::DeepModelTy, <D as DeepModel>::DeepModelTy, <E as DeepModel>::DeepModelTy)
Source§impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel> DeepModel for (A, B, C, D, E, F)
impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel> DeepModel for (A, B, C, D, E, F)
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy, <B as DeepModel>::DeepModelTy, <C as DeepModel>::DeepModelTy, <D as DeepModel>::DeepModelTy, <E as DeepModel>::DeepModelTy, <F as DeepModel>::DeepModelTy)
Source§impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel> DeepModel for (A, B, C, D, E, F, G)
impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel> DeepModel for (A, B, C, D, E, F, G)
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy, <B as DeepModel>::DeepModelTy, <C as DeepModel>::DeepModelTy, <D as DeepModel>::DeepModelTy, <E as DeepModel>::DeepModelTy, <F as DeepModel>::DeepModelTy, <G as DeepModel>::DeepModelTy)
Source§impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel, H: DeepModel> DeepModel for (A, B, C, D, E, F, G, H)
impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel, H: DeepModel> DeepModel for (A, B, C, D, E, F, G, H)
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy, <B as DeepModel>::DeepModelTy, <C as DeepModel>::DeepModelTy, <D as DeepModel>::DeepModelTy, <E as DeepModel>::DeepModelTy, <F as DeepModel>::DeepModelTy, <G as DeepModel>::DeepModelTy, <H as DeepModel>::DeepModelTy)
Source§impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel, H: DeepModel, I: DeepModel> DeepModel for (A, B, C, D, E, F, G, H, I)
impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel, H: DeepModel, I: DeepModel> DeepModel for (A, B, C, D, E, F, G, H, I)
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy, <B as DeepModel>::DeepModelTy, <C as DeepModel>::DeepModelTy, <D as DeepModel>::DeepModelTy, <E as DeepModel>::DeepModelTy, <F as DeepModel>::DeepModelTy, <G as DeepModel>::DeepModelTy, <H as DeepModel>::DeepModelTy, <I as DeepModel>::DeepModelTy)
Source§impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel, H: DeepModel, I: DeepModel, J: DeepModel> DeepModel for (A, B, C, D, E, F, G, H, I, J)
impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel, H: DeepModel, I: DeepModel, J: DeepModel> DeepModel for (A, B, C, D, E, F, G, H, I, J)
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy, <B as DeepModel>::DeepModelTy, <C as DeepModel>::DeepModelTy, <D as DeepModel>::DeepModelTy, <E as DeepModel>::DeepModelTy, <F as DeepModel>::DeepModelTy, <G as DeepModel>::DeepModelTy, <H as DeepModel>::DeepModelTy, <I as DeepModel>::DeepModelTy, <J as DeepModel>::DeepModelTy)
Source§impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel, H: DeepModel, I: DeepModel, J: DeepModel, K: DeepModel> DeepModel for (A, B, C, D, E, F, G, H, I, J, K)
impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel, H: DeepModel, I: DeepModel, J: DeepModel, K: DeepModel> DeepModel for (A, B, C, D, E, F, G, H, I, J, K)
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy, <B as DeepModel>::DeepModelTy, <C as DeepModel>::DeepModelTy, <D as DeepModel>::DeepModelTy, <E as DeepModel>::DeepModelTy, <F as DeepModel>::DeepModelTy, <G as DeepModel>::DeepModelTy, <H as DeepModel>::DeepModelTy, <I as DeepModel>::DeepModelTy, <J as DeepModel>::DeepModelTy, <K as DeepModel>::DeepModelTy)
Source§impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel, H: DeepModel, I: DeepModel, J: DeepModel, K: DeepModel, L: DeepModel> DeepModel for (A, B, C, D, E, F, G, H, I, J, K, L)
impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel, H: DeepModel, I: DeepModel, J: DeepModel, K: DeepModel, L: DeepModel> DeepModel for (A, B, C, D, E, F, G, H, I, J, K, L)
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy, <B as DeepModel>::DeepModelTy, <C as DeepModel>::DeepModelTy, <D as DeepModel>::DeepModelTy, <E as DeepModel>::DeepModelTy, <F as DeepModel>::DeepModelTy, <G as DeepModel>::DeepModelTy, <H as DeepModel>::DeepModelTy, <I as DeepModel>::DeepModelTy, <J as DeepModel>::DeepModelTy, <K as DeepModel>::DeepModelTy, <L as DeepModel>::DeepModelTy)
Source§impl<T: DeepModel + ?Sized> DeepModel for &T
impl<T: DeepModel + ?Sized> DeepModel for &T
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
(*self).deep_model()
type DeepModelTy = <T as DeepModel>::DeepModelTy
Source§impl<T: DeepModel + ?Sized> DeepModel for &mut T
impl<T: DeepModel + ?Sized> DeepModel for &mut T
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
(*self).deep_model()
type DeepModelTy = <T as DeepModel>::DeepModelTy
Source§impl<T: DeepModel> DeepModel for [T]
impl<T: DeepModel> DeepModel for [T]
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic ⚠
ensures
(&self)@.len() == result.len()
ensures
forall<i: Int> 0 <= i && i < result.len() ==> result[i] == (&self)[i].deep_model()
type DeepModelTy = Seq<<T as DeepModel>::DeepModelTy>
Source§impl<T: DeepModel, A: Allocator> DeepModel for Rc<T, A>
impl<T: DeepModel, A: Allocator> DeepModel for Rc<T, A>
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self.view().deep_model() }
type DeepModelTy = <T as DeepModel>::DeepModelTy
Source§impl<T: DeepModel, A: Allocator> DeepModel for Arc<T, A>
impl<T: DeepModel, A: Allocator> DeepModel for Arc<T, A>
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self.view().deep_model() }
type DeepModelTy = <T as DeepModel>::DeepModelTy
Source§impl<T: DeepModel, const N: usize> DeepModel for [T; N]
impl<T: DeepModel, const N: usize> DeepModel for [T; N]
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic ⚠
ensures
self.view().len() == result.len()
ensures
forall<i: _> 0 <= i && i < result.len() ==> result[i] == self[i].deep_model()
type DeepModelTy = Seq<<T as DeepModel>::DeepModelTy>
Source§impl<T: ?Sized> DeepModel for *const T
impl<T: ?Sized> DeepModel for *const T
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic ⚠
ensures
result.addr == self.addr_logic()
type DeepModelTy = PtrDeepModel
Source§impl<T: ?Sized> DeepModel for *mut T
impl<T: ?Sized> DeepModel for *mut T
Source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic ⚠
ensures
result.addr == self.addr_logic()