ROSE  0.11.51.0
Classes | Public Member Functions | List of all members
Rose::BinaryAnalysis::ModelChecker::PathQueue Class Referencefinal

Description

List of path endpoints in an execution tree.

A queue of execution tree vertices ordered by some user-defined metric. The metric is defined by the PathPrioritizer supplied as a constructor argument.

Definition at line 16 of file PathQueue.h.

#include <PathQueue.h>

Classes

class  Visitor
 Visitor for traversing a queue. More...
 

Public Member Functions

 PathQueue (const PathPrioritizerPtr &)
 Empty queue constructor. More...
 
size_t size () const
 Property: Size of queue. More...
 
bool isEmpty () const
 Test emptiness. More...
 
void reset ()
 Reset to empty state. More...
 
void insert (const PathPtr &)
 Insert a path. More...
 
PathPtr takeNext ()
 Take the next path from this queue. More...
 
void traverse (Visitor &) const
 Visit each path in the queue. More...
 
PathPrioritizerPtr prioritizer () const
 Property: Prioritization predicate. More...
 
void prioritizer (const PathPrioritizerPtr &)
 Property: Prioritization predicate. More...
 

Constructor & Destructor Documentation

Rose::BinaryAnalysis::ModelChecker::PathQueue::PathQueue ( const PathPrioritizerPtr &  )

Empty queue constructor.

The prioritizer must not be null.

Member Function Documentation

PathPrioritizerPtr Rose::BinaryAnalysis::ModelChecker::PathQueue::prioritizer ( ) const

Property: Prioritization predicate.

The prioritization predicate controls the order that paths are sorted in this priority queue. It's normally specified when the queue is created, but can in fact be changed afterward. Changing it blocks access to this queue by other threads while the members of this queue are resorted.

The prioritizer cannot be a null pointer.

Thread safety: This method is thread safe.

void Rose::BinaryAnalysis::ModelChecker::PathQueue::prioritizer ( const PathPrioritizerPtr &  )

Property: Prioritization predicate.

The prioritization predicate controls the order that paths are sorted in this priority queue. It's normally specified when the queue is created, but can in fact be changed afterward. Changing it blocks access to this queue by other threads while the members of this queue are resorted.

The prioritizer cannot be a null pointer.

Thread safety: This method is thread safe.

size_t Rose::BinaryAnalysis::ModelChecker::PathQueue::size ( ) const

Property: Size of queue.

This returns the number of paths in this queue.

Thread safety: This method is thread safe.

bool Rose::BinaryAnalysis::ModelChecker::PathQueue::isEmpty ( ) const

Test emptiness.

Returns true if and only if this queue contains no paths.

Thread safety: This method is thread safe.

void Rose::BinaryAnalysis::ModelChecker::PathQueue::reset ( )

Reset to empty state.

Removes all items but does not change the prioritizer.

Thread safety: This method is thread safe.

void Rose::BinaryAnalysis::ModelChecker::PathQueue::insert ( const PathPtr &  )

Insert a path.

Insert a path into this queue. The path must not already be a member of the queue.

Thread safety: This method is thread safe.

PathPtr Rose::BinaryAnalysis::ModelChecker::PathQueue::takeNext ( )

Take the next path from this queue.

Returns a pointer to the next path, the one with the highest priority according to the path prioritizer specified in the constructor. If this queue is empty, then a null pointer is returned. The returned path is removed from this queue.

Thread safety: This method is thread safe.

void Rose::BinaryAnalysis::ModelChecker::PathQueue::traverse ( Visitor ) const

Visit each path in the queue.

The visitor functor is called for each path in the queue in no particular order until either all paths are visited or one of the visitor calls returns false.

Thread safety: This method is thread safe. The queue is locked for the duration of the traversal.


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