Struct AnalysisRunner

Source
pub struct AnalysisRunner { /* private fields */ }
Expand description

A type responsible for caching CFGs and running analysis passes over all functions and templates.

Implementations§

Source§

impl AnalysisRunner

Source

pub fn new(curve: Curve) -> Self

Source

pub fn with_libraries(self, libraries: &[PathBuf]) -> Self

Source

pub fn with_files(self, input_files: &[PathBuf]) -> (Self, ReportCollection)

Source

pub fn file_library(&self) -> &FileLibrary

Source

pub fn template_names(&self, user_input_only: bool) -> Vec<String>

Source

pub fn function_names(&self, user_input_only: bool) -> Vec<String>

Source

pub fn analyze_templates<W: LogWriter + ReportWriter>( &mut self, writer: &mut W, user_input_only: bool, )

Source

pub fn analyze_functions<W: LogWriter + ReportWriter>( &mut self, writer: &mut W, user_input_only: bool, )

Source

pub fn take_template(&mut self, name: &str) -> Result<Cfg, AnalysisError>

Source

pub fn take_function(&mut self, name: &str) -> Result<Cfg, AnalysisError>

Source

pub fn replace_template(&mut self, name: &str, cfg: Cfg) -> bool

Source

pub fn replace_function(&mut self, name: &str, cfg: Cfg) -> bool

Trait Implementations§

Source§

impl AnalysisContext for AnalysisRunner

Source§

fn is_template(&self, name: &str) -> bool

Returns true if the context knows of a template with the given name. This method does not compute the CFG of the template which saves time compared to AnalysisContext::template.
Source§

fn is_function(&self, name: &str) -> bool

Returns true if the context knows of a function with the given name. This method does not compute the CFG of the function which saves time compared to AnalysisContext::function.
Source§

fn template(&mut self, name: &str) -> Result<&Cfg, AnalysisError>

Returns the CFG for the template with the given name.
Source§

fn function(&mut self, name: &str) -> Result<&Cfg, AnalysisError>

Returns the CFG for the function with the given name.
Source§

fn underlying_str( &self, file_id: &FileID, file_location: &FileLocation, ) -> Result<String, AnalysisError>

Returns the string corresponding to the given file ID and location.
Source§

impl Default for AnalysisRunner

Source§

fn default() -> AnalysisRunner

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V