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>

source

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.

source

pub fn compute_function_signatures( &self ) -> (BTreeMap<Tid, FunctionSignature>, Vec<LogMessage>)

Compute the function signatures for internal functions.

source

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.

source

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.

source

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.

source

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.

source

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>

source§

fn clone(&self) -> AnalysisResults<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Copy for AnalysisResults<'a>

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for AnalysisResults<'a>

§

impl<'a> Send for AnalysisResults<'a>

§

impl<'a> Sync for AnalysisResults<'a>

§

impl<'a> Unpin for AnalysisResults<'a>

§

impl<'a> UnwindSafe for AnalysisResults<'a>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.