Trait cwe_checker_lib::analysis::fixpoint::Context
source · pub trait Context {
type EdgeLabel: Clone;
type NodeLabel;
type NodeValue: PartialEq + Eq + Clone;
// Required methods
fn get_graph(&self) -> &DiGraph<Self::NodeLabel, Self::EdgeLabel>;
fn merge(
&self,
val1: &Self::NodeValue,
val2: &Self::NodeValue
) -> Self::NodeValue;
fn update_edge(
&self,
value: &Self::NodeValue,
edge: EdgeIndex
) -> Option<Self::NodeValue>;
}
Expand description
The context of a fixpoint computation.
All trait methods have access to the FixpointProblem structure, so that context informations are accessible through it.
Required Associated Types§
Required Methods§
sourcefn get_graph(&self) -> &DiGraph<Self::NodeLabel, Self::EdgeLabel>
fn get_graph(&self) -> &DiGraph<Self::NodeLabel, Self::EdgeLabel>
Get the graph on which the fixpoint computation operates.
sourcefn merge(
&self,
val1: &Self::NodeValue,
val2: &Self::NodeValue
) -> Self::NodeValue
fn merge( &self, val1: &Self::NodeValue, val2: &Self::NodeValue ) -> Self::NodeValue
This function describes how to merge two values
sourcefn update_edge(
&self,
value: &Self::NodeValue,
edge: EdgeIndex
) -> Option<Self::NodeValue>
fn update_edge( &self, value: &Self::NodeValue, edge: EdgeIndex ) -> Option<Self::NodeValue>
This function describes how the value at the end node of an edge is computed from the value at the start node of the edge. The function can return None to indicate that no end value gets generated through this edge. E.g. In a control flow graph, if the edge cannot be taken for the given start value, this function should return None.
Object Safety§
This trait is not object safe.