pub struct Permute5<A, B, C, D, E>(pub A, pub B, pub C, pub D, pub E);Expand description
Permute5<A, B, C, D, E> parses any permutation and produces (A::PVal, (B::PVal, (C::PVal, (D::PVal, E::PVal))))
Permute5(A, B, C, D, E) ::= Alt(
(A, Permute4(B, C, D, E)),
Alt(
Mapped((B, Permute4(A, C, D, E)), swap5_1),
Alt(
Mapped((C, Permute4(A, B, D, E)), swap5_2),
Alt(
Mapped((D, Permute4(A, B, C, E)), swap5_3),
Mapped((E, Permute4(A, B, C, D)), swap5_4),
)
)
)
)Tuple Fields§
§0: A§1: B§2: C§3: D§4: ETrait Implementations§
Source§impl<A, B, C, D, E, TA, TB, TC, TD, TE> ByteLen<(TA, (TB, (TC, (TD, TE))))> for Permute5<A, B, C, D, E>
impl<A, B, C, D, E, TA, TB, TC, TD, TE> ByteLen<(TA, (TB, (TC, (TD, TE))))> for Permute5<A, B, C, D, E>
Source§impl<A: Clone, B: Clone, C: Clone, D: Clone, E: Clone> Clone for Permute5<A, B, C, D, E>
impl<A: Clone, B: Clone, C: Clone, D: Clone, E: Clone> Clone for Permute5<A, B, C, D, E>
Source§exec fn clone(&self) -> cloned : Self
exec fn clone(&self) -> cloned : Self
ensures
call_ensures(A::clone, (&self.0,), cloned.0),call_ensures(B::clone, (&self.1,), cloned.1),call_ensures(C::clone, (&self.2,), cloned.2),call_ensures(D::clone, (&self.3,), cloned.3),call_ensures(E::clone, (&self.4,), cloned.4),1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<A, B, C, D, E> Consistency for Permute5<A, B, C, D, E>
impl<A, B, C, D, E> Consistency for Permute5<A, B, C, D, E>
Source§open spec fn consistent(&self, v: Self::Val) -> bool
open spec fn consistent(&self, v: Self::Val) -> bool
{
self.0.consistent(v.0) && self.1.consistent(v.1.0) && self.2.consistent(v.1.1.0)
&& self.3.consistent(v.1.1.1.0) && self.4.consistent(v.1.1.1.1)
}Source§type Val = (<A as Consistency>::Val, (<B as Consistency>::Val, (<C as Consistency>::Val, (<D as Consistency>::Val, <E as Consistency>::Val))))
type Val = (<A as Consistency>::Val, (<B as Consistency>::Val, (<C as Consistency>::Val, (<D as Consistency>::Val, <E as Consistency>::Val))))
The type of values whose consistency is being checked.
Source§impl<A, B, C, D, E> EquivSerializers for Permute5<A, B, C, D, E>where
A: EquivSerializersGeneral,
B: EquivSerializersGeneral,
C: EquivSerializersGeneral,
D: EquivSerializersGeneral,
E: EquivSerializers,
impl<A, B, C, D, E> EquivSerializers for Permute5<A, B, C, D, E>where
A: EquivSerializersGeneral,
B: EquivSerializersGeneral,
C: EquivSerializersGeneral,
D: EquivSerializersGeneral,
E: EquivSerializers,
Source§impl<A, B, C, D, E> EquivSerializersGeneral for Permute5<A, B, C, D, E>where
A: EquivSerializersGeneral,
B: EquivSerializersGeneral,
C: EquivSerializersGeneral,
D: EquivSerializersGeneral,
E: EquivSerializersGeneral,
impl<A, B, C, D, E> EquivSerializersGeneral for Permute5<A, B, C, D, E>where
A: EquivSerializersGeneral,
B: EquivSerializersGeneral,
C: EquivSerializersGeneral,
D: EquivSerializersGeneral,
E: EquivSerializersGeneral,
Source§open spec fn equiv_general_inv(&self) -> bool
open spec fn equiv_general_inv(&self) -> bool
{
&&& self.0.equiv_general_inv()
&&& self.1.equiv_general_inv()
&&& self.2.equiv_general_inv()
&&& self.3.equiv_general_inv()
&&& self.4.equiv_general_inv()
}Source§proof fn lemma_serialize_equiv(&self, v: Self::SVal, obuf: Seq<u8>)
proof fn lemma_serialize_equiv(&self, v: Self::SVal, obuf: Seq<u8>)
Source§impl<A, B, C, D, E> GoodSerializer for Permute5<A, B, C, D, E>where
A: GoodSerializer,
B: GoodSerializer,
C: GoodSerializer,
D: GoodSerializer,
E: GoodSerializer,
impl<A, B, C, D, E> GoodSerializer for Permute5<A, B, C, D, E>where
A: GoodSerializer,
B: GoodSerializer,
C: GoodSerializer,
D: GoodSerializer,
E: GoodSerializer,
Source§open spec fn serialize_inv(&self) -> bool
open spec fn serialize_inv(&self) -> bool
{
&&& self.0.serialize_inv()
&&& self.1.serialize_inv()
&&& self.2.serialize_inv()
&&& self.3.serialize_inv()
&&& self.4.serialize_inv()
}Source§proof fn lemma_serialize_len(&self, v: Self::SVal)
proof fn lemma_serialize_len(&self, v: Self::SVal)
Source§impl<A: MinMaxByteLen, B: MinMaxByteLen, C: MinMaxByteLen, D: MinMaxByteLen, E: MinMaxByteLen> MinMaxByteLen for Permute5<A, B, C, D, E>
impl<A: MinMaxByteLen, B: MinMaxByteLen, C: MinMaxByteLen, D: MinMaxByteLen, E: MinMaxByteLen> MinMaxByteLen for Permute5<A, B, C, D, E>
Source§impl<A, B, C, D, E> NonTailFmt for Permute5<A, B, C, D, E>
impl<A, B, C, D, E> NonTailFmt for Permute5<A, B, C, D, E>
Source§open spec fn serialize_dps_inv(&self) -> bool
open spec fn serialize_dps_inv(&self) -> bool
{
&&& self.0.serialize_dps_inv()
&&& self.1.serialize_dps_inv()
&&& self.2.serialize_dps_inv()
&&& self.3.serialize_dps_inv()
&&& self.4.serialize_dps_inv()
}Source§proof fn lemma_serialize_dps_prepend(&self, v: Self::SValue, obuf: Seq<u8>)
proof fn lemma_serialize_dps_prepend(&self, v: Self::SValue, obuf: Seq<u8>)
Source§proof fn lemma_serialize_dps_len(&self, v: Self::SValue, obuf: Seq<u8>)
proof fn lemma_serialize_dps_len(&self, v: Self::SValue, obuf: Seq<u8>)
Source§impl<I, A, B, C, D, E> Parser<I> for Permute5<A, B, C, D, E>where
I: InputBuf,
A: Parser<I> + SafeParser,
B: Parser<I> + SafeParser,
C: Parser<I> + SafeParser,
D: Parser<I> + SafeParser,
E: Parser<I> + SafeParser,
impl<I, A, B, C, D, E> Parser<I> for Permute5<A, B, C, D, E>where
I: InputBuf,
A: Parser<I> + SafeParser,
B: Parser<I> + SafeParser,
C: Parser<I> + SafeParser,
D: Parser<I> + SafeParser,
E: Parser<I> + SafeParser,
Source§impl<A, B, C, D, E, TA, TB, TC, TD, TE> Prepare<(TA, (TB, (TC, (TD, TE))))> for Permute5<A, B, C, D, E>
impl<A, B, C, D, E, TA, TB, TC, TD, TE> Prepare<(TA, (TB, (TC, (TD, TE))))> for Permute5<A, B, C, D, E>
Source§impl<A: Productive, B: Productive, C: Productive, D: Productive, E: Productive> Productive for Permute5<A, B, C, D, E>
impl<A: Productive, B: Productive, C: Productive, D: Productive, E: Productive> Productive for Permute5<A, B, C, D, E>
Source§open spec fn productive_inv(&self) -> bool
open spec fn productive_inv(&self) -> bool
{
&&& self.0.productive_inv()
&&& self.1.productive_inv()
&&& self.2.productive_inv()
&&& self.3.productive_inv()
&&& self.4.productive_inv()
}Source§proof fn lemma_productive(&self, ibuf: Seq<u8>)
proof fn lemma_productive(&self, ibuf: Seq<u8>)
Source§impl<A, B, C, D, E> SPRoundTripDps for Permute5<A, B, C, D, E>where
A: SPRoundTripDps + NonTailFmt,
B: SPRoundTripDps + NonTailFmt,
C: SPRoundTripDps + NonTailFmt,
D: SPRoundTripDps + NonTailFmt,
E: SPRoundTripDps,
impl<A, B, C, D, E> SPRoundTripDps for Permute5<A, B, C, D, E>where
A: SPRoundTripDps + NonTailFmt,
B: SPRoundTripDps + NonTailFmt,
C: SPRoundTripDps + NonTailFmt,
D: SPRoundTripDps + NonTailFmt,
E: SPRoundTripDps,
Source§open spec fn unambiguous(&self) -> bool
open spec fn unambiguous(&self) -> bool
{
&&& self.0.unambiguous()
&&& self.1.unambiguous()
&&& self.2.unambiguous()
&&& self.3.unambiguous()
&&& self.4.unambiguous()
&&& self.0.serialize_dps_inv()
&&& self.1.serialize_dps_inv()
&&& self.2.serialize_dps_inv()
&&& self.3.serialize_dps_inv()
}Source§proof fn theorem_serialize_dps_parse_roundtrip(&self, v: Self::T, obuf: Seq<u8>)
proof fn theorem_serialize_dps_parse_roundtrip(&self, v: Self::T, obuf: Seq<u8>)
Source§impl<A: SafeParser, B: SafeParser, C: SafeParser, D: SafeParser, E: SafeParser> SafeParser for Permute5<A, B, C, D, E>
impl<A: SafeParser, B: SafeParser, C: SafeParser, D: SafeParser, E: SafeParser> SafeParser for Permute5<A, B, C, D, E>
Source§impl<Output: OutputBuf, A, B, C, D, E, TA, TB, TC, TD, TE> Serializer<Output, (TA, (TB, (TC, (TD, TE))))> for Permute5<A, B, C, D, E>where
TA: DeepView,
TB: DeepView,
TC: DeepView,
TD: DeepView,
TE: DeepView,
A: Serializer<Output, TA>,
B: Serializer<Output, TB>,
C: Serializer<Output, TC>,
D: Serializer<Output, TD>,
E: Serializer<Output, TE>,
impl<Output: OutputBuf, A, B, C, D, E, TA, TB, TC, TD, TE> Serializer<Output, (TA, (TB, (TC, (TD, TE))))> for Permute5<A, B, C, D, E>where
TA: DeepView,
TB: DeepView,
TC: DeepView,
TD: DeepView,
TE: DeepView,
A: Serializer<Output, TA>,
B: Serializer<Output, TB>,
C: Serializer<Output, TC>,
D: Serializer<Output, TD>,
E: Serializer<Output, TE>,
Source§open spec fn exec_inv(&self) -> bool
open spec fn exec_inv(&self) -> bool
{
&&& self.0.exec_inv()
&&& self.1.exec_inv()
&&& self.2.exec_inv()
&&& self.3.exec_inv()
&&& self.4.exec_inv()
}Source§exec fn serialize_into(&self, v: &(TA, (TB, (TC, (TD, TE)))), obuf: &mut Output)
exec fn serialize_into(&self, v: &(TA, (TB, (TC, (TD, TE)))), obuf: &mut Output)
Source§impl<A: SoundParser, B: SoundParser, C: SoundParser, D: SoundParser, E: SoundParser> SoundParser for Permute5<A, B, C, D, E>
impl<A: SoundParser, B: SoundParser, C: SoundParser, D: SoundParser, E: SoundParser> SoundParser for Permute5<A, B, C, D, E>
Source§impl<A: SpecByteLen, B: SpecByteLen, C: SpecByteLen, D: SpecByteLen, E: SpecByteLen> SpecByteLen for Permute5<A, B, C, D, E>
impl<A: SpecByteLen, B: SpecByteLen, C: SpecByteLen, D: SpecByteLen, E: SpecByteLen> SpecByteLen for Permute5<A, B, C, D, E>
Source§open spec fn byte_len(&self, v: Self::T) -> nat
open spec fn byte_len(&self, v: Self::T) -> nat
{ Pair(self.0, super::Permute4(self.1, self.2, self.3, self.4)).byte_len(v) }Source§type T = (<A as SpecByteLen>::T, (<B as SpecByteLen>::T, (<C as SpecByteLen>::T, (<D as SpecByteLen>::T, <E as SpecByteLen>::T))))
type T = (<A as SpecByteLen>::T, (<B as SpecByteLen>::T, (<C as SpecByteLen>::T, (<D as SpecByteLen>::T, <E as SpecByteLen>::T))))
The type of values whose byte length is being computed.
Source§impl<A, B, C, D, E> SpecParser for Permute5<A, B, C, D, E>
impl<A, B, C, D, E> SpecParser for Permute5<A, B, C, D, E>
Source§open spec fn spec_parse(&self, ibuf: Seq<u8>) -> Option<(int, Self::PVal)>
open spec fn spec_parse(&self, ibuf: Seq<u8>) -> Option<(int, Self::PVal)>
{
let inner = Alt::<
_,
_,
false,
>(
Pair(self.0, super::Permute4(self.1, self.2, self.3, self.4)),
Alt::<
_,
_,
false,
>(
Mapped {
inner: Pair(self.1, super::Permute4(self.0, self.2, self.3, self.4)),
mapper: |i| super::swap5_1(i),
},
Alt::<
_,
_,
false,
>(
Mapped {
inner: Pair(self.2, super::Permute4(self.0, self.1, self.3, self.4)),
mapper: |i| super::swap5_2(i),
},
Alt::<
_,
_,
false,
>(
Mapped {
inner: Pair(
self.3,
super::Permute4(self.0, self.1, self.2, self.4),
),
mapper: |i| super::swap5_3(i),
},
Mapped {
inner: Pair(
self.4,
super::Permute4(self.0, self.1, self.2, self.3),
),
mapper: |i| super::swap5_4(i),
},
),
),
),
);
inner.spec_parse(ibuf)
}Source§type PVal = (<A as SpecParser>::PVal, (<B as SpecParser>::PVal, (<C as SpecParser>::PVal, (<D as SpecParser>::PVal, <E as SpecParser>::PVal))))
type PVal = (<A as SpecParser>::PVal, (<B as SpecParser>::PVal, (<C as SpecParser>::PVal, (<D as SpecParser>::PVal, <E as SpecParser>::PVal))))
The type of parsed values.
Source§impl<A, B, C, D, E> SpecSerializer for Permute5<A, B, C, D, E>where
A: SpecSerializer,
B: SpecSerializer,
C: SpecSerializer,
D: SpecSerializer,
E: SpecSerializer,
impl<A, B, C, D, E> SpecSerializer for Permute5<A, B, C, D, E>where
A: SpecSerializer,
B: SpecSerializer,
C: SpecSerializer,
D: SpecSerializer,
E: SpecSerializer,
Source§open spec fn spec_serialize(&self, v: Self::SVal) -> Seq<u8>
open spec fn spec_serialize(&self, v: Self::SVal) -> Seq<u8>
{ Pair(self.0, super::Permute4(self.1, self.2, self.3, self.4)).spec_serialize(v) }Source§type SVal = (<A as SpecSerializer>::SVal, (<B as SpecSerializer>::SVal, (<C as SpecSerializer>::SVal, (<D as SpecSerializer>::SVal, <E as SpecSerializer>::SVal))))
type SVal = (<A as SpecSerializer>::SVal, (<B as SpecSerializer>::SVal, (<C as SpecSerializer>::SVal, (<D as SpecSerializer>::SVal, <E as SpecSerializer>::SVal))))
The type of values to be serialized.
Source§impl<A, B, C, D, E> SpecSerializerDps for Permute5<A, B, C, D, E>where
A: SpecSerializerDps,
B: SpecSerializerDps,
C: SpecSerializerDps,
D: SpecSerializerDps,
E: SpecSerializerDps,
impl<A, B, C, D, E> SpecSerializerDps for Permute5<A, B, C, D, E>where
A: SpecSerializerDps,
B: SpecSerializerDps,
C: SpecSerializerDps,
D: SpecSerializerDps,
E: SpecSerializerDps,
Source§open spec fn spec_serialize_dps(&self, v: Self::SValue, obuf: Seq<u8>) -> Seq<u8>
open spec fn spec_serialize_dps(&self, v: Self::SValue, obuf: Seq<u8>) -> Seq<u8>
{
Pair(self.0, super::Permute4(self.1, self.2, self.3, self.4))
.spec_serialize_dps(v, obuf)
}Source§type SValue = (<A as SpecSerializerDps>::SValue, (<B as SpecSerializerDps>::SValue, (<C as SpecSerializerDps>::SValue, (<D as SpecSerializerDps>::SValue, <E as SpecSerializerDps>::SValue))))
type SValue = (<A as SpecSerializerDps>::SValue, (<B as SpecSerializerDps>::SValue, (<C as SpecSerializerDps>::SValue, (<D as SpecSerializerDps>::SValue, <E as SpecSerializerDps>::SValue))))
The type of values to be serialized.
Source§impl<A: StaticByteLen, B: StaticByteLen, C: StaticByteLen, D: StaticByteLen, E: StaticByteLen> StaticByteLen for Permute5<A, B, C, D, E>
impl<A: StaticByteLen, B: StaticByteLen, C: StaticByteLen, D: StaticByteLen, E: StaticByteLen> StaticByteLen for Permute5<A, B, C, D, E>
Source§open spec fn static_byte_len() -> nat
open spec fn static_byte_len() -> nat
{
A::static_byte_len()
+ <super::Permute4<B, C, D, E> as StaticByteLen>::static_byte_len()
}Source§proof fn lemma_static_len_matches_byte_len(&self, v: Self::T)
proof fn lemma_static_len_matches_byte_len(&self, v: Self::T)
Source§impl<A: ValueByteLen, B: ValueByteLen, C: ValueByteLen, D: ValueByteLen, E: ValueByteLen> ValueByteLen for Permute5<A, B, C, D, E>
impl<A: ValueByteLen, B: ValueByteLen, C: ValueByteLen, D: ValueByteLen, E: ValueByteLen> ValueByteLen for Permute5<A, B, C, D, E>
Source§open spec fn value_byte_len(v: Self::T) -> nat
open spec fn value_byte_len(v: Self::T) -> nat
{
<crate::combinators::Pair<
A,
super::Permute4<B, C, D, E>,
> as ValueByteLen>::value_byte_len(v)
}Source§proof fn lemma_value_len_matches_byte_len(&self, v: Self::T)
proof fn lemma_value_len_matches_byte_len(&self, v: Self::T)
impl<A: Copy, B: Copy, C: Copy, D: Copy, E: Copy> Copy for Permute5<A, B, C, D, E>
Auto Trait Implementations§
impl<A, B, C, D, E> Freeze for Permute5<A, B, C, D, E>
impl<A, B, C, D, E> RefUnwindSafe for Permute5<A, B, C, D, E>
impl<A, B, C, D, E> Send for Permute5<A, B, C, D, E>
impl<A, B, C, D, E> Sync for Permute5<A, B, C, D, E>
impl<A, B, C, D, E> Unpin for Permute5<A, B, C, D, E>
impl<A, B, C, D, E> UnsafeUnpin for Permute5<A, B, C, D, E>
impl<A, B, C, D, E> UnwindSafe for Permute5<A, B, C, D, E>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, VERUS_SPEC__A> FromSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: From<T>,
impl<T, VERUS_SPEC__A> FromSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: From<T>,
fn obeys_from_spec() -> bool
fn from_spec(v: T) -> VERUS_SPEC__A
§impl<T, VERUS_SPEC__A> IntoSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: Into<T>,
impl<T, VERUS_SPEC__A> IntoSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: Into<T>,
fn obeys_into_spec() -> bool
fn into_spec(self) -> T
§impl<T, U> IntoSpecImpl<U> for Twhere
U: From<T>,
impl<T, U> IntoSpecImpl<U> for Twhere
U: From<T>,
fn obeys_into_spec() -> bool
fn into_spec(self) -> U
Source§impl<C> NonAmbiguous for Cwhere
C: SPRoundTrip,
impl<C> NonAmbiguous for Cwhere
C: SPRoundTrip,
Source§open spec fn nonamb_inv(&self) -> bool
open spec fn nonamb_inv(&self) -> bool
{ self.sp_roundtrip_inv() }Source§proof fn lemma_serialize_injective(
&self,
v1: <C as Consistency>::Val,
v2: <C as Consistency>::Val,
)
proof fn lemma_serialize_injective( &self, v1: <C as Consistency>::Val, v2: <C as Consistency>::Val, )
Source§impl<C> SPRoundTrip for C
impl<C> SPRoundTrip for C
Source§open spec fn sp_roundtrip_inv(&self) -> bool
open spec fn sp_roundtrip_inv(&self) -> bool
{ self.serialize_inv() && self.equiv_inv() && self.unambiguous() }