Struct miden_processor::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§
source§impl Program
impl Program
sourcepub fn new(root: CodeBlock) -> Program
pub fn new(root: CodeBlock) -> Program
Instantiates a new Program from the specified code block.
sourcepub fn with_kernel(
root: CodeBlock,
kernel: Kernel,
cb_table: CodeBlockTable
) -> Program
pub fn with_kernel( root: CodeBlock, kernel: Kernel, cb_table: CodeBlockTable ) -> Program
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§
source§impl From<Program> for ProgramInfo
impl From<Program> for ProgramInfo
source§fn from(program: Program) -> ProgramInfo
fn from(program: Program) -> ProgramInfo
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Program
impl RefUnwindSafe for Program
impl Send for Program
impl Sync for Program
impl Unpin for Program
impl UnwindSafe for Program
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