[][src]Struct haybale::simple_memory::Memory

pub struct Memory { /* fields omitted */ }

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]

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]

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>>

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.