Static Value-Flow Analysis
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Attributes | List of all members
SVF::WTOCycle< GraphT > Class Template Reference

#include <WTO.h>

Inheritance diagram for SVF::WTOCycle< GraphT >:
SVF::WTOComponent< GraphT >

Public Types

typedef GraphT::NodeType NodeT
 
typedef WTOComponent< GraphTWTOComponentT
 
typedef WTOComponentRefList::const_iterator Iterator
 Iterator over the components.
 
- Public Types inherited from SVF::WTOComponent< GraphT >
enum  WTOCT { Node , Cycle }
 

Public Member Functions

 WTOCycle (const WTONode< GraphT > *head, WTOComponentRefList components)
 Constructor.
 
const WTONode< GraphT > * head () const
 Return the head of the cycle.
 
const WTOComponentRefListgetWTOComponents () const
 Get all wto components in WTO cycle.
 
Iterator begin () const
 Begin iterator over the components.
 
Iterator end () const
 End iterator over the components.
 
void accept (WTOComponentVisitor< GraphT > &v) const override
 Accept the given visitor.
 
std::string toString () const override
 Dump the cycle, for debugging purpose.
 
- Public Member Functions inherited from SVF::WTOComponent< GraphT >
 WTOComponent (WTOCT k)
 Default constructor.
 
 WTOComponent (const WTOComponent &) noexcept=default
 Copy constructor.
 
 WTOComponent (WTOComponent &&) noexcept=default
 Move constructor.
 
WTOComponentoperator= (const WTOComponent &) noexcept=default
 Copy assignment operator.
 
WTOComponentoperator= (WTOComponent &&) noexcept=default
 Move assignment operator.
 
virtual ~WTOComponent ()=default
 Destructor.
 
WTOCT getKind () const
 

Static Public Member Functions

static bool classof (const WTOCycle< GraphT > *)
 ClassOf.
 
static bool classof (const WTOComponent< GraphT > *c)
 

Private Types

typedef const WTOComponentTWTOComponentPtr
 
typedef std::list< WTOComponentPtrWTOComponentRefList
 

Private Attributes

const WTONode< GraphT > * _head
 Head of the cycle.
 
WTOComponentRefList _components
 List of components.
 

Additional Inherited Members

- Public Attributes inherited from SVF::WTOComponent< GraphT >
WTOCT _type
 

Detailed Description

template<typename GraphT>
class SVF::WTOCycle< GraphT >

WTO cycle for GraphT

Definition at line 379 of file WTO.h.

Member Typedef Documentation

◆ Iterator

template<typename GraphT >
typedef WTOComponentRefList::const_iterator SVF::WTOCycle< GraphT >::Iterator

Iterator over the components.

Definition at line 393 of file WTO.h.

◆ NodeT

template<typename GraphT >
typedef GraphT::NodeType SVF::WTOCycle< GraphT >::NodeT

Definition at line 384 of file WTO.h.

◆ WTOComponentPtr

template<typename GraphT >
typedef const WTOComponentT* SVF::WTOCycle< GraphT >::WTOComponentPtr
private

Definition at line 388 of file WTO.h.

◆ WTOComponentRefList

template<typename GraphT >
typedef std::list<WTOComponentPtr> SVF::WTOCycle< GraphT >::WTOComponentRefList
private

Definition at line 389 of file WTO.h.

◆ WTOComponentT

Definition at line 385 of file WTO.h.

Constructor & Destructor Documentation

◆ WTOCycle()

template<typename GraphT >
SVF::WTOCycle< GraphT >::WTOCycle ( const WTONode< GraphT > *  head,
WTOComponentRefList  components 
)
inline

Constructor.

Definition at line 404 of file WTO.h.

406 _components(std::move(components))
407 {
408 }
const WTONode< GraphT > * _head
Head of the cycle.
Definition WTO.h:397
WTOComponentRefList _components
List of components.
Definition WTO.h:400
const WTONode< GraphT > * head() const
Return the head of the cycle.
Definition WTO.h:411
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:76

Member Function Documentation

◆ accept()

template<typename GraphT >
void SVF::WTOCycle< GraphT >::accept ( WTOComponentVisitor< GraphT > &  v) const
inlineoverridevirtual

Accept the given visitor.

Implements SVF::WTOComponent< GraphT >.

Definition at line 435 of file WTO.h.

436 {
437 v.visit(*this);
438 }

◆ begin()

template<typename GraphT >
Iterator SVF::WTOCycle< GraphT >::begin ( ) const
inline

Begin iterator over the components.

Definition at line 423 of file WTO.h.

424 {
425 return _components.cbegin();
426 }

◆ classof() [1/2]

template<typename GraphT >
static bool SVF::WTOCycle< GraphT >::classof ( const WTOComponent< GraphT > *  c)
inlinestatic

Definition at line 447 of file WTO.h.

448 {
449 return c->getKind() == WTOComponent<GraphT>::Cycle;
450 }

◆ classof() [2/2]

template<typename GraphT >
static bool SVF::WTOCycle< GraphT >::classof ( const WTOCycle< GraphT > *  )
inlinestatic

ClassOf.

Definition at line 442 of file WTO.h.

443 {
444 return true;
445 }

◆ end()

template<typename GraphT >
Iterator SVF::WTOCycle< GraphT >::end ( ) const
inline

End iterator over the components.

Definition at line 429 of file WTO.h.

430 {
431 return _components.cend();
432 }

◆ getWTOComponents()

template<typename GraphT >
const WTOComponentRefList & SVF::WTOCycle< GraphT >::getWTOComponents ( ) const
inline

Get all wto components in WTO cycle.

Definition at line 417 of file WTO.h.

418 {
419 return _components;
420 }

◆ head()

template<typename GraphT >
const WTONode< GraphT > * SVF::WTOCycle< GraphT >::head ( ) const
inline

Return the head of the cycle.

Definition at line 411 of file WTO.h.

412 {
413 return _head;
414 }

◆ toString()

template<typename GraphT >
std::string SVF::WTOCycle< GraphT >::toString ( ) const
inlineoverridevirtual

Dump the cycle, for debugging purpose.

Implements SVF::WTOComponent< GraphT >.

Definition at line 454 of file WTO.h.

455 {
456 std::string str;
457 std::stringstream rawstr(str);
458 rawstr << "(";
459 rawstr << _head->getICFGNode()->getId() << ", ";
460 for (auto it = begin(), et = end(); it != et;)
461 {
462 rawstr << (*it)->toString();
463 ++it;
464 if (it != et)
465 {
466 rawstr << ", ";
467 }
468 }
469 rawstr << ")";
470 return rawstr.str();
471 }
Iterator end() const
End iterator over the components.
Definition WTO.h:429
Iterator begin() const
Begin iterator over the components.
Definition WTO.h:423

Member Data Documentation

◆ _components

template<typename GraphT >
WTOComponentRefList SVF::WTOCycle< GraphT >::_components
private

List of components.

Definition at line 400 of file WTO.h.

◆ _head

template<typename GraphT >
const WTONode<GraphT>* SVF::WTOCycle< GraphT >::_head
private

Head of the cycle.

Definition at line 397 of file WTO.h.


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