Enum cwe_checker_lib::analysis::graph::Node
source · pub enum Node<'a> {
BlkStart(&'a Term<Blk>, &'a Term<Sub>),
BlkEnd(&'a Term<Blk>, &'a Term<Sub>),
CallReturn {
call: (&'a Term<Blk>, &'a Term<Sub>),
return_: (&'a Term<Blk>, &'a Term<Sub>),
},
CallSource {
source: (&'a Term<Blk>, &'a Term<Sub>),
target: (&'a Term<Blk>, &'a Term<Sub>),
},
}
Expand description
The node type of an interprocedural control flow graph
Each node carries a pointer to its associated block with it.
For CallReturn
nodes the associated blocks are both the CallSource
block (containing the call instruction)
and the returning-from block (containing the return instruction).
For CallSource
nodes the associated block is the callsite block (source)
and the target block of the call.
Basic blocks are allowed to be contained in more than one Sub
.
In the control flow graph such basic blocks occur once per subroutine they are contained in.
For this reason, the nodes also carry a pointer to the corresponding subroutine with them
to allow unambigous node identification.
Variants§
BlkStart(&'a Term<Blk>, &'a Term<Sub>)
A node corresponding to the start of a basic block, i.e. to the point in time just before the execution of the block.
BlkEnd(&'a Term<Blk>, &'a Term<Sub>)
A node corresponding to the end of the basic block,
i.e. to the point in time just after the execution of all Def
instructions in the block
but before execution of the jump instructions at the end of the block.
CallReturn
Fields
An artificial node. See the module-level documentation for more information.
CallSource
Fields
An artificial node. See the module-level documentation for more information.
Implementations§
Trait Implementations§
source§impl<'a> PartialEq for Node<'a>
impl<'a> PartialEq for Node<'a>
impl<'a> Copy for Node<'a>
impl<'a> Eq for Node<'a>
impl<'a> StructuralEq for Node<'a>
impl<'a> StructuralPartialEq for Node<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Node<'a>
impl<'a> Send for Node<'a>
impl<'a> Sync for Node<'a>
impl<'a> Unpin for Node<'a>
impl<'a> UnwindSafe for Node<'a>
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.