retdec
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
retdec::llvmir2hll::PatternFinder Class Referenceabstract

A base class for all pattern finders. More...

#include <pattern_finder.h>

Inheritance diagram for retdec::llvmir2hll::PatternFinder:
Inheritance graph
[legend]
Collaboration diagram for retdec::llvmir2hll::PatternFinder:
Collaboration graph
[legend]

Public Types

using Patterns = std::vector< ShPtr< Pattern > >
 A list of patterns. More...
 

Public Member Functions

virtual ~PatternFinder ()=default
 
virtual const std::string getId () const =0
 Returns the ID of the finder. More...
 
virtual Patterns findPatterns (ShPtr< Module > module)=0
 Finds patterns in the given module and returns them. More...
 

Protected Member Functions

 PatternFinder (ShPtr< ValueAnalysis > va, ShPtr< CallInfoObtainer > cio)
 Constructs a pattern finder. More...
 

Protected Attributes

ShPtr< ValueAnalysisva
 Analysis of values. More...
 
ShPtr< CallInfoObtainercio
 The used call info obtainer. More...
 

Additional Inherited Members

- Private Member Functions inherited from retdec::utils::NonCopyable
 NonCopyable (const NonCopyable &)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 
 NonCopyable ()=default
 
 ~NonCopyable ()=default
 

Detailed Description

A base class for all pattern finders.

A concrete finder should

Note: Do NOT set the ID of your concrete finder to "all" as this ID is reserved.

Instances of this class have reference object semantics.

Member Typedef Documentation

◆ Patterns

A list of patterns.

Constructor & Destructor Documentation

◆ ~PatternFinder()

virtual retdec::llvmir2hll::PatternFinder::~PatternFinder ( )
virtualdefault

◆ PatternFinder()

retdec::llvmir2hll::PatternFinder::PatternFinder ( ShPtr< ValueAnalysis va,
ShPtr< CallInfoObtainer cio 
)
protected

Constructs a pattern finder.

Parameters
[in]vaThe used analysis of values.
[in]cioThe used call info obtainer.
Preconditions
  • va and cio are non-null
  • va is in a valid state
  • cio has been initialized

Member Function Documentation

◆ findPatterns()

virtual Patterns retdec::llvmir2hll::PatternFinder::findPatterns ( ShPtr< Module module)
pure virtual

Finds patterns in the given module and returns them.

Implemented in retdec::llvmir2hll::APICallSeqPatternFinder, and retdec::llvmir2hll::APICallPatternFinder.

◆ getId()

virtual const std::string retdec::llvmir2hll::PatternFinder::getId ( ) const
pure virtual

Member Data Documentation

◆ cio

ShPtr<CallInfoObtainer> retdec::llvmir2hll::PatternFinder::cio
protected

The used call info obtainer.

◆ va

ShPtr<ValueAnalysis> retdec::llvmir2hll::PatternFinder::va
protected

Analysis of values.


The documentation for this class was generated from the following files: