pub struct VmValue<'ctx, 'tcx> {
pub term: Int<'ctx>,
pub ty: Ty<'tcx>,
pub provenance: Option<Provenance<'ctx>>,
pub invariants: ValueInvariants,
}Expand description
A symbolic value tracked by the VM.
§Semantics of term
- For pointer/reference types (
&T,*const T,*mut T,Box<T>, etc.):termrepresents the address in the VM’s logical address space. - For scalar types (integers,
bool,char):termrepresents the value. - For aggregate types (struct, tuple, enum):
termis the base address of the stack allocation backing the aggregate.
When provenance is Some, the following relationship holds and is
asserted into the solver at check time:
term == alloc[provenance.alloc_id].base + provenance.offset
Fields§
§term: Int<'ctx>The Z3 integer term (address or scalar value, see struct docs).
ty: Ty<'tcx>Rust type, for layout queries.
provenance: Option<Provenance<'ctx>>Which allocation this pointer derives from and at what offset.
invariants: ValueInvariantsKnown constraints on this value.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'ctx, 'tcx> !DynSend for VmValue<'ctx, 'tcx>
impl<'ctx, 'tcx> !DynSync for VmValue<'ctx, 'tcx>
impl<'ctx, 'tcx> !RefUnwindSafe for VmValue<'ctx, 'tcx>
impl<'ctx, 'tcx> !Send for VmValue<'ctx, 'tcx>
impl<'ctx, 'tcx> !Sync for VmValue<'ctx, 'tcx>
impl<'ctx, 'tcx> !UnwindSafe for VmValue<'ctx, 'tcx>
impl<'ctx, 'tcx> Freeze for VmValue<'ctx, 'tcx>
impl<'ctx, 'tcx> Unpin for VmValue<'ctx, 'tcx>
impl<'ctx, 'tcx> UnsafeUnpin for VmValue<'ctx, 'tcx>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more