[−][src]Trait stir::blocks::BasicBlock
Required methods
fn label(&self) -> &String
Return the unique label of the block
fn debug(&self)
Allows run-time inspection of the block
Example
use stir::blocks::{Boolean, BasicBlock}; let b = Boolean::new(false); b.debug(); // Also usable in the `fry` interpreter
fn output(&self) -> String
Transforms the block into its corresponding STIR representation
fn interpret(&self) -> bool
Interpret and execute a block
Example
use stir::blocks::{Boolean, BasicBlock}; let b = Boolean::new(true); assert!(b.interpret());
Provided methods
fn is_critical(&self) -> bool
If the block is critical or if it can safely be parallelized
Example
use stir::blocks::{Boolean, Critical, BasicBlock}; let non_crit_b = Boolean::new(false); let critical_boolean_block = Boolean::new(true); let critical_b = Critical::new(&critical_boolean_block); assert!(critical_b.is_critical()); assert!(!non_crit_b.is_critical());