pub struct Memory { /* private fields */ }

Implementations§

source§

impl Memory

source

pub const CELL_BITS: u32 = 8u32

source

pub const BITS_IN_BYTE: u32 = 8u32

source

pub const LOG_BITS_IN_BYTE: u32 = 3u32

source

pub const CELL_BYTES: u32 = 1u32

source

pub fn new_uninitialized( btor: Rc<Btor>, null_detection: bool, name: Option<&str>, addr_bits: u32 ) -> Self

A new Memory, whose contents at all addresses are completely uninitialized (unconstrained)

null_detection: if true, all memory accesses will be checked to ensure their addresses cannot be NULL, throwing Error::NullPointerDereference if NULL is a possible solution for the address

name: a name for this Memory, or None to use the default name (as of this writing, ‘mem’)

addr_bits: e.g. 64 for a Memory which uses 64-bit addresses

source

pub fn new_zero_initialized( btor: Rc<Btor>, null_detection: bool, name: Option<&str>, addr_bits: u32 ) -> Self

A new Memory, whose contents at all addresses are initialized to be 0

null_detection: if true, all memory accesses will be checked to ensure their addresses cannot be NULL, throwing Error::NullPointerDereference if NULL is a possible solution for the address

name: a name for this Memory, or None to use the default name (as of this writing, ‘mem_initialized’)

addr_bits: e.g. 64 for a Memory which uses 64-bit addresses

source

pub fn get_solver(&self) -> Rc<Btor>

Get a reference to the Btor instance this Memory belongs to

source

pub fn change_solver(&mut self, new_btor: Rc<Btor>)

Adapt the Memory to a new Btor instance.

The new Btor instance should have been created (possibly transitively) via Btor::duplicate() from the Btor this Memory was originally created with (or most recently changed to). Further, no new variables should have been added since the call to Btor::duplicate().

source

pub fn read(&self, addr: &BV<Rc<Btor>>, bits: u32) -> Result<BV<Rc<Btor>>>

Read any number (>0) of bits of memory, at any alignment. Returned BV will have size bits.

source

pub fn write(&mut self, addr: &BV<Rc<Btor>>, val: BV<Rc<Btor>>) -> Result<()>

Write any number (>0) of bits of memory, at any alignment.

Trait Implementations§

source§

impl Clone for Memory

source§

fn clone(&self) -> Memory

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Memory

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Memory for Memory

§

type SolverRef = Rc<Btor>

§

type Index = BV<Rc<Btor>>

§

type Value = BV<Rc<Btor>>

source§

fn new_uninitialized( btor: Rc<Btor>, null_detection: bool, name: Option<&str>, addr_bits: u32 ) -> Self

A new Memory, whose contents at all addresses are completely uninitialized (unconstrained) Read more
source§

fn new_zero_initialized( btor: Rc<Btor>, null_detection: bool, name: Option<&str>, addr_bits: u32 ) -> Self

A new Memory, whose contents at all addresses are initialized to be 0 Read more
source§

fn read(&self, index: &Self::Index, bits: u32) -> Result<Self::Value>

Read any number (>0) of bits of memory, at any alignment. Returned BV will have size bits.
source§

fn write(&mut self, index: &Self::Index, value: Self::Value) -> Result<()>

Write any number (>0) of bits of memory, at any alignment.
source§

fn get_solver(&self) -> Rc<Btor>

Get a reference to the solver instance this Memory belongs to
source§

fn change_solver(&mut self, new_btor: Rc<Btor>)

Adapt the Memory to a new solver instance. Read more
source§

impl PartialEq for Memory

source§

fn eq(&self, other: &Memory) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for Memory

source§

impl StructuralEq for Memory

source§

impl StructuralPartialEq for Memory

Auto Trait Implementations§

§

impl RefUnwindSafe for Memory

§

impl !Send for Memory

§

impl !Sync for Memory

§

impl Unpin for Memory

§

impl UnwindSafe for Memory

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.