Struct test_generation::control_flow_graph::CFG
source · [−]pub struct CFG { /* private fields */ }Expand description
A control flow graph
Implementations
sourceimpl CFG
impl CFG
sourcepub fn new(
rng: &mut StdRng,
locals: &[SignatureToken],
parameters: &Signature,
target_blocks: u16
) -> CFG
pub fn new(
rng: &mut StdRng,
locals: &[SignatureToken],
parameters: &Signature,
target_blocks: u16
) -> CFG
Construct a control flow graph that contains empty basic blocks with set incoming and outgoing locals. Currently the control flow graph is acyclic.
sourcepub fn get_basic_blocks(&self) -> &HashMap<u16, BasicBlock>
pub fn get_basic_blocks(&self) -> &HashMap<u16, BasicBlock>
Get a reference to all of the basic blocks of the CFG
sourcepub fn get_basic_blocks_mut(&mut self) -> &mut HashMap<u16, BasicBlock>
pub fn get_basic_blocks_mut(&mut self) -> &mut HashMap<u16, BasicBlock>
Get a mutable reference to all of the basic blocks of the CFG
sourcepub fn get_children_ids(&self, block_id: u16) -> Vec<u16>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn get_children_ids(&self, block_id: u16) -> Vec<u16>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Retrieve the block IDs of all children of the given basic block block_id
sourcepub fn num_children(&self, block_id: u16) -> u8
pub fn num_children(&self, block_id: u16) -> u8
Retrieve the number of children the given basic block block_id
sourcepub fn get_parent_ids(&self, block_id: u16) -> Vec<u16>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn get_parent_ids(&self, block_id: u16) -> Vec<u16>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Retrieve the block IDs of all parents of the given basic block block_id
sourcepub fn num_parents(&self, block_id: u16) -> u8
pub fn num_parents(&self, block_id: u16) -> u8
Retrieve the number of parents the given basic block block_id
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for CFG
impl Send for CFG
impl Sync for CFG
impl Unpin for CFG
impl UnwindSafe for CFG
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more