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 380 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 394 of file WTO.h.

◆ NodeT

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

Definition at line 385 of file WTO.h.

◆ WTOComponentPtr

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

Definition at line 389 of file WTO.h.

◆ WTOComponentRefList

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

Definition at line 390 of file WTO.h.

◆ WTOComponentT

Definition at line 386 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 405 of file WTO.h.

407 _components(std::move(components))
408 {
409 }
const WTONode< GraphT > * _head
Head of the cycle.
Definition WTO.h:398
WTOComponentRefList _components
List of components.
Definition WTO.h:401
const WTONode< GraphT > * head() const
Return the head of the cycle.
Definition WTO.h:412
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74

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 436 of file WTO.h.

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

◆ begin()

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

Begin iterator over the components.

Definition at line 424 of file WTO.h.

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

◆ classof() [1/2]

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

Definition at line 448 of file WTO.h.

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

◆ classof() [2/2]

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

ClassOf.

Definition at line 443 of file WTO.h.

444 {
445 return true;
446 }

◆ end()

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

End iterator over the components.

Definition at line 430 of file WTO.h.

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

◆ getWTOComponents()

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

Get all wto components in WTO cycle.

Definition at line 418 of file WTO.h.

419 {
420 return _components;
421 }

◆ head()

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

Return the head of the cycle.

Definition at line 412 of file WTO.h.

413 {
414 return _head;
415 }

◆ 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 455 of file WTO.h.

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

Member Data Documentation

◆ _components

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

List of components.

Definition at line 401 of file WTO.h.

◆ _head

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

Head of the cycle.

Definition at line 398 of file WTO.h.


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