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

#include <CFGrammar.h>

Public Member Functions

 CFLFIFOWorkList ()
 
 ~CFLFIFOWorkList ()
 
bool empty () const
 
bool find (Data data) const
 
bool push (Data data)
 
Data pop ()
 
void clear ()
 

Private Types

typedef GrammarBase::SymbolSet< DataDataSet
 
typedef std::deque< DataDataDeque
 

Private Attributes

DataSet data_set
 store all data in the work list.
 
DataDeque data_list
 work list using std::vector.
 

Detailed Description

template<class Data>
class SVF::CFLFIFOWorkList< Data >

Worklist with "first in first out" order. New nodes will be pushed at back and popped from front. Elements in the list are unique as they're recorded by Set.

Definition at line 407 of file CFGrammar.h.

Member Typedef Documentation

◆ DataDeque

template<class Data >
typedef std::deque<Data> SVF::CFLFIFOWorkList< Data >::DataDeque
private

Definition at line 410 of file CFGrammar.h.

◆ DataSet

Definition at line 409 of file CFGrammar.h.

Constructor & Destructor Documentation

◆ CFLFIFOWorkList()

template<class Data >
SVF::CFLFIFOWorkList< Data >::CFLFIFOWorkList ( )
inline

Definition at line 412 of file CFGrammar.h.

412{}

◆ ~CFLFIFOWorkList()

template<class Data >
SVF::CFLFIFOWorkList< Data >::~CFLFIFOWorkList ( )
inline

Definition at line 414 of file CFGrammar.h.

414{}

Member Function Documentation

◆ clear()

template<class Data >
void SVF::CFLFIFOWorkList< Data >::clear ( )
inline

Clear all the data

Definition at line 456 of file CFGrammar.h.

457 {
458 data_list.clear();
459 data_set.clear();
460 }
DataDeque data_list
work list using std::vector.
Definition CFGrammar.h:464
DataSet data_set
store all data in the work list.
Definition CFGrammar.h:463

◆ empty()

template<class Data >
bool SVF::CFLFIFOWorkList< Data >::empty ( ) const
inline

Definition at line 416 of file CFGrammar.h.

417 {
418 return data_list.empty();
419 }

◆ find()

template<class Data >
bool SVF::CFLFIFOWorkList< Data >::find ( Data  data) const
inline

Definition at line 421 of file CFGrammar.h.

422 {
423 return (data_set.find(data) == data_set.end() ? false : true);
424 }
#define true
Definition cJSON.cpp:65

◆ pop()

template<class Data >
Data SVF::CFLFIFOWorkList< Data >::pop ( )
inline

Pop a data from the END of work list.

Definition at line 444 of file CFGrammar.h.

445 {
446 assert(!empty() && "work list is empty");
447 Data data = data_list.front();
448 data_list.pop_front();
449 data_set.erase(data);
450 return data;
451 }
bool empty() const
Definition CFGrammar.h:416
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74

◆ push()

template<class Data >
bool SVF::CFLFIFOWorkList< Data >::push ( Data  data)
inline

Push a data into the work list.

Definition at line 429 of file CFGrammar.h.

430 {
431 if (data_set.find(data) == data_set.end())
432 {
433 data_list.push_back(data);
434 data_set.insert(data);
435 return true;
436 }
437 else
438 return false;
439 }

Member Data Documentation

◆ data_list

template<class Data >
DataDeque SVF::CFLFIFOWorkList< Data >::data_list
private

work list using std::vector.

Definition at line 464 of file CFGrammar.h.

◆ data_set

template<class Data >
DataSet SVF::CFLFIFOWorkList< Data >::data_set
private

store all data in the work list.

Definition at line 463 of file CFGrammar.h.


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