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.