[−][src]Enum haybale_pitchfork::secret::BV
A wrapper around boolector::BV which can represent either public or secret
data.
Variants
Secret values are opaque because we don't care about their actual value, only how they are used.
PartiallySecret values have some secret and some not-secret bits.
Currently we make just a best-effort attempt to handle these; for now,
some functions may just fall back on treating the entire value as
Secret.
Fields of PartiallySecret
secret_mask: Vec<bool>A vector the length of the PartiallySecret value's bitwidth, where each
true indicates that the corresponding position in the PartiallySecret
is secret, and likewise false indicates public.
secret_mask[0] corresponds to the bit at position 0, which is the
rightmost (least-significant) bit.
data: BV<Rc<Btor>>A BV, which must have bitwidth exactly equal to the length of
secret_mask.
In positions where secret_mask is false, this gives the value of
the public bits.
In positions where secret_mask is true, the data here is invalid
and should not be used for anything.
symbol: Option<String>Methods
impl BV[src]
pub fn is_secret(&self) -> bool[src]
pub fn as_public(&self) -> &BV<Rc<Btor>>[src]
Gets the value out of a BV::Public, panicking if it is instead a BV::Secret
Trait Implementations
impl BV for BV[src]
type SolverRef = BtorRef
fn new(btor: BtorRef, width: u32, name: Option<&str>) -> Self[src]
fn from_bool(btor: BtorRef, b: bool) -> Self[src]
fn from_i32(btor: BtorRef, i: i32, width: u32) -> Self[src]
fn from_u32(btor: BtorRef, u: u32, width: u32) -> Self[src]
fn from_i64(btor: BtorRef, i: i64, width: u32) -> Self[src]
fn from_u64(btor: BtorRef, u: u64, width: u32) -> Self[src]
fn zero(btor: BtorRef, width: u32) -> Self[src]
fn one(btor: BtorRef, width: u32) -> Self[src]
fn ones(btor: BtorRef, width: u32) -> Self[src]
fn from_binary_str(btor: BtorRef, bits: &str) -> Self[src]
fn from_dec_str(btor: BtorRef, num: &str, width: u32) -> Self[src]
fn from_hex_str(btor: BtorRef, num: &str, width: u32) -> Self[src]
fn as_binary_str(&self) -> Option<String>[src]
fn as_u64(&self) -> Option<u64>[src]
fn as_bool(&self) -> Option<bool>[src]
fn get_a_solution(&self) -> Result<BVSolution>[src]
fn get_solver(&self) -> Self::SolverRef[src]
fn get_id(&self) -> i32[src]
fn get_width(&self) -> u32[src]
fn get_symbol(&self) -> Option<&str>[src]
fn set_symbol(&mut self, symbol: Option<&str>)[src]
fn is_const(&self) -> bool[src]
fn has_same_width(&self, other: &Self) -> bool[src]
fn assert(&self) -> Result<()>[src]
fn is_failed_assumption(&self) -> bool[src]
fn _eq(&self, other: &Self) -> Self[src]
fn _ne(&self, other: &Self) -> Self[src]
fn add(&self, other: &Self) -> Self[src]
fn sub(&self, other: &Self) -> Self[src]
fn mul(&self, other: &Self) -> Self[src]
fn udiv(&self, other: &Self) -> Self[src]
fn sdiv(&self, other: &Self) -> Self[src]
fn urem(&self, other: &Self) -> Self[src]
fn srem(&self, other: &Self) -> Self[src]
fn smod(&self, other: &Self) -> Self[src]
fn inc(&self) -> Self[src]
fn dec(&self) -> Self[src]
fn neg(&self) -> Self[src]
fn uaddo(&self, other: &Self) -> Self[src]
fn saddo(&self, other: &Self) -> Self[src]
fn usubo(&self, other: &Self) -> Self[src]
fn ssubo(&self, other: &Self) -> Self[src]
fn umulo(&self, other: &Self) -> Self[src]
fn smulo(&self, other: &Self) -> Self[src]
fn sdivo(&self, other: &Self) -> Self[src]
fn not(&self) -> Self[src]
fn and(&self, other: &Self) -> Self[src]
fn or(&self, other: &Self) -> Self[src]
fn xor(&self, other: &Self) -> Self[src]
fn nand(&self, other: &Self) -> Self[src]
fn nor(&self, other: &Self) -> Self[src]
fn xnor(&self, other: &Self) -> Self[src]
fn sll(&self, other: &Self) -> Self[src]
fn srl(&self, other: &Self) -> Self[src]
fn sra(&self, other: &Self) -> Self[src]
fn rol(&self, other: &Self) -> Self[src]
fn ror(&self, other: &Self) -> Self[src]
fn redand(&self) -> Self[src]
fn redor(&self) -> Self[src]
fn redxor(&self) -> Self[src]
fn ugt(&self, other: &Self) -> Self[src]
fn ugte(&self, other: &Self) -> Self[src]
fn sgt(&self, other: &Self) -> Self[src]
fn sgte(&self, other: &Self) -> Self[src]
fn ult(&self, other: &Self) -> Self[src]
fn ulte(&self, other: &Self) -> Self[src]
fn slt(&self, other: &Self) -> Self[src]
fn slte(&self, other: &Self) -> Self[src]
fn uadds(&self, other: &Self) -> Self[src]
fn sadds(&self, other: &Self) -> Self[src]
fn usubs(&self, other: &Self) -> Self[src]
fn ssubs(&self, other: &Self) -> Self[src]
fn zext(&self, i: u32) -> Self[src]
fn sext(&self, i: u32) -> Self[src]
fn slice(&self, high: u32, low: u32) -> Self[src]
fn concat(&self, other: &Self) -> Self[src]
fn repeat(&self, n: u32) -> Self[src]
fn iff(&self, other: &Self) -> Self[src]
fn implies(&self, other: &Self) -> Self[src]
fn cond_bv(&self, truebv: &Self, falsebv: &Self) -> Self[src]
fn zero_extend_to_bits(&self, bits: u32) -> Self[src]
fn sign_extend_to_bits(&self, bits: u32) -> Self[src]
impl Clone for BV[src]
impl Debug for BV[src]
impl Eq for BV[src]
impl PartialEq<BV> for BV[src]
impl StructuralEq for BV[src]
impl StructuralPartialEq for BV[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,