Struct miden_core::Program
source · pub struct Program { /* private fields */ }
Expand description
A program which can be executed by the VM.
A program is described by a Merkelized Abstract Syntax Tree (MAST), where each node is a CodeBlock. Internal nodes describe control flow semantics of the program, while leaf nodes contain linear sequences of instructions which contain no control flow.
Implementations
sourceimpl Program
impl Program
sourcepub fn with_kernel(
root: CodeBlock,
kernel: Kernel,
cb_table: CodeBlockTable
) -> Self
pub fn with_kernel(
root: CodeBlock,
kernel: Kernel,
cb_table: CodeBlockTable
) -> Self
Instantiates a new Program from the specified code block and associated code block table.
sourcepub fn cb_table(&self) -> &CodeBlockTable
pub fn cb_table(&self) -> &CodeBlockTable
Returns code block table for this program.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Program
impl Send for Program
impl Sync for Program
impl Unpin for Program
impl UnwindSafe for Program
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more