ClearBlue
Public Member Functions | Protected Attributes
MultiVulnerability Class Referenceabstract

#include <Vulnerability.h>

Public Member Functions

virtual const char * getFullName ()=0
 Get the full name of the vulnerability.
 
virtual const char * getAbbrName ()=0
 Get the abbr name of the vulnerability.
 
bool add (std::shared_ptr< Vulnerability > V)
 
std::shared_ptr< Vulnerabilityget (size_t Index) const
 
size_t size () const
 
std::vector< std::shared_ptr< Vulnerability > >::const_iterator begin () const
 
std::vector< std::shared_ptr< Vulnerability > >::const_iterator end () const
 
virtual void buildDependence ()=0
 
void insertHeadDependence (std::shared_ptr< Vulnerability > V1, std::shared_ptr< Vulnerability > V2, GetTraceFunctionTy &Func)
 
void insertTailDependence (std::shared_ptr< Vulnerability > V1, std::shared_ptr< Vulnerability > V2, GetTraceFunctionTy &Func)
 
std::set< std::shared_ptr< Vulnerability > >::iterator head_dep_begin (std::shared_ptr< Vulnerability > V)
 
std::set< std::shared_ptr< Vulnerability > >::iterator head_dep_end (std::shared_ptr< Vulnerability > V)
 
std::set< std::shared_ptr< Vulnerability > >::iterator tail_dep_begin (std::shared_ptr< Vulnerability > V)
 
std::set< std::shared_ptr< Vulnerability > >::iterator tail_dep_end (std::shared_ptr< Vulnerability > V)
 
const SEGObjectgetTraceHead (std::shared_ptr< Vulnerability > V1, std::shared_ptr< VulnerabilityTrace > T1, std::shared_ptr< Vulnerability > V2)
 
const SEGObjectgetTraceTail (std::shared_ptr< Vulnerability > V1, std::shared_ptr< VulnerabilityTrace > T1, std::shared_ptr< Vulnerability > V2)
 

Protected Attributes

std::vector< std::shared_ptr< Vulnerability > > Vulns
 What the multi-vulnerability consists of.
 
typedef std::pair< std::shared_ptr< Vulnerability >, std::shared_ptr< Vulnerability > > VulnPairTy
 
typedef std::function< const SEGObject *(std::shared_ptr< VulnerabilityTrace >)> GetTraceFunctionTy
 
std::map< std::shared_ptr< Vulnerability >, std::set< std::shared_ptr< Vulnerability > > > HeadDeps
 
std::map< std::shared_ptr< Vulnerability >, std::set< std::shared_ptr< Vulnerability > > > TailDeps
 
std::map< VulnPairTy, GetTraceFunctionTy > HeadDepFctorMap
 
std::map< VulnPairTy, GetTraceFunctionTy > TailDepFctorMap
 

Detailed Description

This class describes multi-vulnerability, which is a composition of vulnerability instances.

Member Function Documentation

◆ add()

bool MultiVulnerability::add ( std::shared_ptr< Vulnerability V)
inline

Functions describing what a multi-vulnerability consists of

◆ buildDependence()

virtual void MultiVulnerability::buildDependence ( )
pure virtual

Override this function to describe how the muti-vulnerability is made of the contained vulnerabilities

Call get(size_t I) to get the Ith part of the vulnerability. The order of its parts follows the order in which it is registered.

Call insertHeadDependence(...) and insertTailDependence(...) in the function to build the dependence between parts of the multi-vulnerability

◆ getTraceHead()

const SEGObject* MultiVulnerability::getTraceHead ( std::shared_ptr< Vulnerability V1,
std::shared_ptr< VulnerabilityTrace >  T1,
std::shared_ptr< Vulnerability V2 
)
inline

Given a part of the multi-vulnerability V1 and a trace T1 of this part, return the head and tail of the trace belonging to the part V2

If there is no dependence between V1 and V2, { nullptr, nullptr } returns.

◆ head_dep_begin()

std::set<std::shared_ptr<Vulnerability> >::iterator MultiVulnerability::head_dep_begin ( std::shared_ptr< Vulnerability V)
inline

The iterators that iterates on the parts on which V depends.

◆ insertHeadDependence()

void MultiVulnerability::insertHeadDependence ( std::shared_ptr< Vulnerability V1,
std::shared_ptr< Vulnerability V2,
GetTraceFunctionTy &  Func 
)
inline

V1's trace decide the head of V2's trace Func provides interface for getting the head.

◆ insertTailDependence()

void MultiVulnerability::insertTailDependence ( std::shared_ptr< Vulnerability V1,
std::shared_ptr< Vulnerability V2,
GetTraceFunctionTy &  Func 
)
inline

V1's trace decide the tail of V2's trace Func provides interface for getting the tail.

Field Documentation

◆ HeadDeps

std::map<std::shared_ptr<Vulnerability>, std::set<std::shared_ptr<Vulnerability> > > MultiVulnerability::HeadDeps
protected

Dependences between parts of the multi-vulnerability

If HeadDeps[V1].count(V2), V1's trace will decide the head of V2's trace TraceHeadDepMap stores the function that can get the head of V2's trace

◆ TailDeps

std::map<std::shared_ptr<Vulnerability>, std::set<std::shared_ptr<Vulnerability> > > MultiVulnerability::TailDeps
protected

If TailDeps[V1].count(V2), V1's trace will decide the tail of V2's trace TraceTailDepMap stores the function that can get the tail of V2's trace


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