[−][src]Struct haybale::simple_memory::Memory
Implementations
impl Memory
[src]
pub const CELL_BITS: u32
[src]
pub const BITS_IN_BYTE: u32
[src]
pub const LOG_BITS_IN_BYTE: u32
[src]
pub const CELL_BYTES: u32
[src]
pub fn new_uninitialized(
btor: Rc<Btor>,
null_detection: bool,
name: Option<&str>,
addr_bits: u32
) -> Self
[src]
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
pub fn new_zero_initialized(
btor: Rc<Btor>,
null_detection: bool,
name: Option<&str>,
addr_bits: u32
) -> Self
[src]
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
pub fn get_solver(&self) -> Rc<Btor>
[src]
Get a reference to the Btor
instance this Memory
belongs to
pub fn change_solver(&mut self, new_btor: Rc<Btor>)
[src]
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()
.
pub fn read(&self, addr: &BV<Rc<Btor>>, bits: u32) -> Result<BV<Rc<Btor>>>
[src]
Read any number (>0) of bits of memory, at any alignment.
Returned BV
will have size bits
.
pub fn write(&mut self, addr: &BV<Rc<Btor>>, val: BV<Rc<Btor>>) -> Result<()>
[src]
Write any number (>0) of bits of memory, at any alignment.
Trait Implementations
impl Clone for Memory
[src]
impl Debug for Memory
[src]
impl Eq for Memory
[src]
impl Memory for Memory
[src]
type SolverRef = Rc<Btor>
type Index = BV<Rc<Btor>>
type Value = BV<Rc<Btor>>
fn new_uninitialized(
btor: Rc<Btor>,
null_detection: bool,
name: Option<&str>,
addr_bits: u32
) -> Self
[src]
btor: Rc<Btor>,
null_detection: bool,
name: Option<&str>,
addr_bits: u32
) -> Self
fn new_zero_initialized(
btor: Rc<Btor>,
null_detection: bool,
name: Option<&str>,
addr_bits: u32
) -> Self
[src]
btor: Rc<Btor>,
null_detection: bool,
name: Option<&str>,
addr_bits: u32
) -> Self
fn read(&self, index: &Self::Index, bits: u32) -> Result<Self::Value>
[src]
fn write(&mut self, index: &Self::Index, value: Self::Value) -> Result<()>
[src]
fn get_solver(&self) -> Rc<Btor>
[src]
fn change_solver(&mut self, new_btor: Rc<Btor>)
[src]
impl PartialEq<Memory> for Memory
[src]
impl StructuralEq for Memory
[src]
impl StructuralPartialEq for Memory
[src]
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
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,
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,