klee
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
klee::WeightedRandomSearcher Class Reference

#include <Searcher.h>

Inheritance diagram for klee::WeightedRandomSearcher:
Collaboration diagram for klee::WeightedRandomSearcher:

Public Types

enum  WeightType {
  Depth, QueryCost, InstCount, CPInstCount,
  MinDistToUncovered, CoveringNew
}
 
- Public Types inherited from klee::Searcher
enum  CoreSearchType {
  DFS, BFS, RandomState, RandomPath,
  NURS_CovNew, NURS_MD2U, NURS_Depth, NURS_ICnt,
  NURS_CPICnt, NURS_QC
}
 

Public Member Functions

 WeightedRandomSearcher (WeightType type)
 
 ~WeightedRandomSearcher ()
 
ExecutionStateselectState ()
 
void update (ExecutionState *current, const std::set< ExecutionState * > &addedStates, const std::set< ExecutionState * > &removedStates)
 
bool empty ()
 
void printName (llvm::raw_ostream &os)
 
- Public Member Functions inherited from klee::Searcher
virtual ~Searcher ()
 
virtual void activate ()
 
virtual void deactivate ()
 
void addState (ExecutionState *es, ExecutionState *current=0)
 
void removeState (ExecutionState *es, ExecutionState *current=0)
 

Private Member Functions

double getWeight (ExecutionState *)
 

Private Attributes

DiscretePDF< ExecutionState * > * states
 
WeightType type
 
bool updateWeights
 

Detailed Description

Definition at line 125 of file Searcher.h.

Member Enumeration Documentation

Enumerator
Depth 
QueryCost 
InstCount 
CPInstCount 
MinDistToUncovered 
CoveringNew 

Definition at line 127 of file Searcher.h.

Constructor & Destructor Documentation

WeightedRandomSearcher::WeightedRandomSearcher ( WeightType  type)
WeightedRandomSearcher::~WeightedRandomSearcher ( )

Definition at line 179 of file Searcher.cpp.

References states.

Member Function Documentation

bool WeightedRandomSearcher::empty ( )
virtual

Implements klee::Searcher.

Definition at line 242 of file Searcher.cpp.

References states.

void klee::WeightedRandomSearcher::printName ( llvm::raw_ostream &  os)
inlinevirtual

Reimplemented from klee::Searcher.

Definition at line 152 of file Searcher.h.

References CoveringNew, CPInstCount, Depth, InstCount, MinDistToUncovered, QueryCost, and type.

ExecutionState & WeightedRandomSearcher::selectState ( )
virtual

Implements klee::Searcher.

Definition at line 183 of file Searcher.cpp.

References klee::RNG::getDoubleL(), states, and klee::theRNG.

Here is the call graph for this function:

void WeightedRandomSearcher::update ( ExecutionState current,
const std::set< ExecutionState * > &  addedStates,
const std::set< ExecutionState * > &  removedStates 
)
virtual

Implements klee::Searcher.

Definition at line 224 of file Searcher.cpp.

References getWeight(), states, and updateWeights.

Here is the call graph for this function:

Member Data Documentation

DiscretePDF<ExecutionState*>* klee::WeightedRandomSearcher::states
private

Definition at line 137 of file Searcher.h.

Referenced by empty(), selectState(), update(), and ~WeightedRandomSearcher().

WeightType klee::WeightedRandomSearcher::type
private

Definition at line 138 of file Searcher.h.

Referenced by getWeight(), printName(), and WeightedRandomSearcher().

bool klee::WeightedRandomSearcher::updateWeights
private

Definition at line 139 of file Searcher.h.

Referenced by update(), and WeightedRandomSearcher().


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