Enum essential_state_asm::Pred
source · pub enum Pred {
Eq,
EqRange,
Gt,
Lt,
Gte,
Lte,
And,
Or,
Not,
EqSet,
}
Expand description
Operations for computing predicates.
Variants§
Eq
EqRange
0x11
Check equality of two ranges on the stack.
The ranges must be of equal length.
The ranges must be stacked sequentially.
Here N
is len -1
.
§Stack Input
[arr_a_0, ..arr_a_N, arr_b_0, ..arr_b_N, len]
§Stack Output
[(top-(2*len))..(top - len) == (top - len)..top]
Gt
0x12
Check if left-hand side is greater than right-hand side.
§Stack Input
[lhs, rhs]
§Stack Output
[lhs > rhs]
Lt
0x13
Check if left-hand side is less than right-hand side.
§Stack Input
[lhs, rhs]
§Stack Output
[lhs < rhs]
Gte
0x14
Check if left-hand side is greater than or equal to right-hand side.
§Stack Input
[lhs, rhs]
§Stack Output
[lhs >= rhs]
Lte
0x15
Check if left-hand side is less than or equal to right-hand side.
§Stack Input
[lhs, rhs]
§Stack Output
[lhs <= rhs]
And
Or
Not
EqSet
0x19
Pop two sets off the stack and check if they are equal. This is set equality so order does not matter. Sets must be the same length.
Note the encoding of each set is:
[elem_0_word_0, ...elem_0_word_I, elem_0_len, ...elem_N_word_0, ...elem_N_word_J, elem_N_len, set_len]
.
Note this differs from EqRange
in that there is a size given at the end of both sets.
§Stack Input
[lhs, lhs_set_length, rhs, rhs_set_length]
§Stack Output
[set(lhs) == set(rhs)]
Trait Implementations§
source§impl From<Pred> for Constraint
impl From<Pred> for Constraint
source§fn from(subgroup: Pred) -> Constraint
fn from(subgroup: Pred) -> Constraint
source§impl Ord for Pred
impl Ord for Pred
source§impl PartialOrd for Pred
impl PartialOrd for Pred
source§impl TryFromBytes for Pred
impl TryFromBytes for Pred
§type Error = FromBytesError
type Error = FromBytesError
impl Copy for Pred
impl Eq for Pred
impl StructuralPartialEq for Pred
Auto Trait Implementations§
impl Freeze for Pred
impl RefUnwindSafe for Pred
impl Send for Pred
impl Sync for Pred
impl Unpin for Pred
impl UnwindSafe for Pred
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)