Struct cwe_checker_lib::pipeline::AnalysisResults
source · pub struct AnalysisResults<'a> {
pub binary: &'a [u8],
pub control_flow_graph: &'a Graph<'a>,
pub project: &'a Project,
pub function_signatures: Option<&'a BTreeMap<Tid, FunctionSignature>>,
pub pointer_inference: Option<&'a PointerInference<'a>>,
pub string_abstraction: Option<&'a StringAbstraction<'a, BricksDomain>>,
}
Expand description
A struct containing pointers to all known analysis results that may be needed as input for other analyses and CWE checks.
Fields§
§binary: &'a [u8]
The content of the binary file
control_flow_graph: &'a Graph<'a>
The computed control flow graph of the program.
project: &'a Project
A pointer to the project struct
function_signatures: Option<&'a BTreeMap<Tid, FunctionSignature>>
The results of the function signature analysis if already computed.
pointer_inference: Option<&'a PointerInference<'a>>
The result of the pointer inference analysis if already computed.
string_abstraction: Option<&'a StringAbstraction<'a, BricksDomain>>
The result of the string abstraction if already computed.
Implementations§
source§impl<'a> AnalysisResults<'a>
impl<'a> AnalysisResults<'a>
sourcepub fn new(
binary: &'a [u8],
control_flow_graph: &'a Graph<'a>,
project: &'a Project
) -> AnalysisResults<'a>
pub fn new( binary: &'a [u8], control_flow_graph: &'a Graph<'a>, project: &'a Project ) -> AnalysisResults<'a>
Create a new AnalysisResults
struct with only the project itself known.
sourcepub fn compute_function_signatures(
&self
) -> (BTreeMap<Tid, FunctionSignature>, Vec<LogMessage>)
pub fn compute_function_signatures( &self ) -> (BTreeMap<Tid, FunctionSignature>, Vec<LogMessage>)
Compute the function signatures for internal functions.
sourcepub fn with_function_signatures(
self,
function_signatures: Option<&'a BTreeMap<Tid, FunctionSignature>>
) -> AnalysisResults<'a>
pub fn with_function_signatures( self, function_signatures: Option<&'a BTreeMap<Tid, FunctionSignature>> ) -> AnalysisResults<'a>
Create a new AnalysisResults
struct containing the given function signature analysis results.
sourcepub fn compute_pointer_inference(
&'a self,
config: &Value,
print_stats: bool
) -> PointerInference<'a>
pub fn compute_pointer_inference( &'a self, config: &Value, print_stats: bool ) -> PointerInference<'a>
Compute the pointer inference analysis.
The result gets returned, but not saved to the AnalysisResults
struct itself.
sourcepub fn with_pointer_inference<'b: 'a>(
self,
pi_results: Option<&'b PointerInference<'a>>
) -> AnalysisResults<'b>
pub fn with_pointer_inference<'b: 'a>( self, pi_results: Option<&'b PointerInference<'a>> ) -> AnalysisResults<'b>
Create a new AnalysisResults
struct containing the given pointer inference analysis results.
sourcepub fn compute_string_abstraction(
&'a self,
config: &Value,
pi_results: Option<&'a PointerInference<'a>>
) -> StringAbstraction<'_, BricksDomain>
pub fn compute_string_abstraction( &'a self, config: &Value, pi_results: Option<&'a PointerInference<'a>> ) -> StringAbstraction<'_, BricksDomain>
Compute the string abstraction.
As the string abstraction depends on the pointer inference, the
pointer inference is also computed and put into the AnalysisResults
struct.
The result gets returned, but not saved to the AnalysisResults
struct itself.
sourcepub fn with_string_abstraction<'b: 'a>(
self,
string_abstraction: Option<&'b StringAbstraction<'a, BricksDomain>>
) -> AnalysisResults<'b>
pub fn with_string_abstraction<'b: 'a>( self, string_abstraction: Option<&'b StringAbstraction<'a, BricksDomain>> ) -> AnalysisResults<'b>
Create a new AnalysisResults
struct containing the given string abstraction results.
Trait Implementations§
source§impl<'a> Clone for AnalysisResults<'a>
impl<'a> Clone for AnalysisResults<'a>
source§fn clone(&self) -> AnalysisResults<'a>
fn clone(&self) -> AnalysisResults<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more