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
impl AnalysisRunner
pub fn new(curve: Curve) -> Self
pub fn with_libraries(self, libraries: &[PathBuf]) -> Self
pub fn with_files(self, input_files: &[PathBuf]) -> (Self, ReportCollection)
pub fn file_library(&self) -> &FileLibrary
pub fn template_names(&self, user_input_only: bool) -> Vec<String>
pub fn function_names(&self, user_input_only: bool) -> Vec<String>
pub fn analyze_templates<W: LogWriter + ReportWriter>( &mut self, writer: &mut W, user_input_only: bool, )
pub fn analyze_functions<W: LogWriter + ReportWriter>( &mut self, writer: &mut W, user_input_only: bool, )
pub fn take_template(&mut self, name: &str) -> Result<Cfg, AnalysisError>
pub fn take_function(&mut self, name: &str) -> Result<Cfg, AnalysisError>
pub fn replace_template(&mut self, name: &str, cfg: Cfg) -> bool
pub fn replace_function(&mut self, name: &str, cfg: Cfg) -> bool
Trait Implementations§
Source§impl AnalysisContext for AnalysisRunner
impl AnalysisContext for AnalysisRunner
Source§fn is_template(&self, name: &str) -> bool
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
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>
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>
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>
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
impl Default for AnalysisRunner
Source§fn default() -> AnalysisRunner
fn default() -> AnalysisRunner
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AnalysisRunner
impl RefUnwindSafe for AnalysisRunner
impl Send for AnalysisRunner
impl Sync for AnalysisRunner
impl Unpin for AnalysisRunner
impl UnwindSafe for AnalysisRunner
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
Mutably borrows from an owned value. Read more