ROSE
0.11.102.0
|
Prioritize shorter paths.
Paths that are shorter (fewer steps) get higher priority. When used with the work queue, this results in a breadth-first search of the virtual execution tree. This is also useful for returning the "interesting" results since one often wants to give priorities to those results that are simpler (i.e., shorter).
Definition at line 42 of file PathPrioritizer.h.
#include <Rose/BinaryAnalysis/ModelChecker/PathPrioritizer.h>
Public Types | |
using | Ptr = ShortestPathFirstPtr |
![]() | |
using | Ptr = PathPrioritizerPtr |
Public Member Functions | |
bool | operator() (const PathPtr &worse, const PathPtr &better) const override |
Priority predicate. More... | |
Static Public Member Functions | |
static Ptr | instance () |
|
overridevirtual |
Priority predicate.
Given two paths, return true if path better
should be explored before path worse
, and false otherwise. This must be a strict weak ordering.
Note that the ordering predicate for C++ heaps is opposite the predicate for sorting containers with operator<. In other words, the item with the highest priority (not the lowest) is the one that will be taken next from the heap.
Thread safety: This method is thread safe. The base implementation is thread safe and all subclass implementations must also be thread safe.
Reimplemented from Rose::BinaryAnalysis::ModelChecker::PathPrioritizer.