57class AndersenWaveDiff;
72class MultiStageSlicer;
123 return lhs->getEdgeID() <
rhs->getEdgeID();
195 const std::vector<RaceClass>&
classes,
257 const std::set<const ICFGNode*>& icfgNodes);
std::vector< ThreadVFCandidate > ThreadVFCandidateList
LockAnalysis * getLockAnalysis()
static void emitRacePairs(MHP *mhp, LockAnalysis *lockAnalysis, const std::vector< RaceOccurrence > &occurrences, const std::vector< RaceClass > &classes, std::set< RacePair > &outRacePairs)
virtual LockAnalysis * computeLocksets(TCT *tct)
Compute locksets.
static std::vector< RaceClass > buildRaceClasses(const std::vector< RaceOccurrence > &occurrences, const std::vector< size_t > &occurrenceIndices)
std::unique_ptr< TCT > tct
static bool occurrencesRace(MHP *mhp, const RaceOccurrence &first, const RaceOccurrence &second)
virtual ~MTA()
Destructor.
static PointsTo getGlobalObjectVariables(SVFIR *svfir)
Escape/points-to helpers for the shared detector.
Map< NodeID, std::vector< size_t > > ObjectToRaceOccurrences
virtual MHP * computeMHP(TCT *tct)
Compute MHP.
static void commitRacePair(std::set< RacePair > &out, const RaceOccurrence &first, const RaceOccurrence &second)
static void collectRaceOccurrences(SVFIR *svfir, AndersenBase *pta, MHP *mhp, LockAnalysis *lockAnalysis, CallGraph *callGraph, const PointsTo &escapedObjects, std::vector< RaceOccurrence > &occurrences, ObjectToRaceOccurrences &objectToOccurrences)
Helpers for the equivalence-class race detector.
std::unique_ptr< MTAStat > stat
static std::set< const SVFStmt * > detectRace(SVFIR *svfir, AndersenBase *pta, MHP *mhp, LockAnalysis *lockAnalysis, CallGraph *callGraph, std::set< RacePair > &outRacePairs)
static bool hasThreadFunctions(CallGraph *callGraph)
virtual bool runOnModule(SVFIR *module)
We start the pass here.
virtual void reportRaces()
Run the shared detector and print a race report.
static PointsTo getPointsToClosure(AndersenBase *pta, const PointsTo &pts)
EdgeID getEdgeID() const
Return Edge ID.
NodeBS preCandidateSolveNodeIds
bool runWholeProgramDetection()
static RaceDigests computeRaceDigests(const std::set< RacePair > &pairs)
std::unique_ptr< LockAnalysis > lockAnalysis
std::set< RacePair > racePairs
AndersenWaveDiff * preAndersen
std::unique_ptr< MTASVFGBuilder > preSVFGBuilder
static std::string raceStatementKey(const SVFStmt *statement)
bool runPTASlicingAndAnalysis()
MTASVFGBuilder::ThreadVFCandidateList selectedThreadVFCandidates
bool runFinalRaceDetection()
std::set< const SVFStmt * > getVulnerableStmts() const
Union of both statements of every candidate race pair (the slice targets).
ThreadCallGraph * threadCallGraph
std::unique_ptr< LockAnalysis > slicedLockAnalysis
std::unique_ptr< SlicedSVFIRView > mtaSlicedView
std::set< RacePair > detectRacePairsOnSlicedGraph(const std::set< RacePair > &preAnalysisRacePairs, BVDataPTAImpl *slicedPTA, MHP *slicedMHP, LockAnalysis *slicedLockAnalysis)
Refine the pre-analysis candidate pairs with main-phase ILA and FSAM.
bool runMTASlicingAndAnalysis()
std::unique_ptr< MultiStageSlicer > multiStageSlicer
static std::set< const ICFGNode * > collectICFGNodes(SVFG *svfg, const NodeBS &svfgNodeIds)
SlicedMTA(const SlicedMTA &)=delete
static void updateDigest(u64_t &digest, const std::string &value)
std::set< const ICFGNode * > singleSlicedNodes
std::unique_ptr< SingleSlicer > singleSlicer
void buildPreAnalysisSVFG()
static void reportPTASliceStatistics(const std::set< const ICFGNode * > &icfgNodes)
NodeBS singleSlicedSVFGNodeIds
SlicedMTA & operator=(const SlicedMTA &)=delete
bool runOnModule(SVFIR *pag, AndersenWaveDiff &preAnalysis)
Run the slicing pipeline with its prepared Andersen pre-analysis.
std::unique_ptr< SlicedSVFIRView > ptaSlicedView
std::unique_ptr< TCT > tct
std::unique_ptr< SlicedSVFGView > slicedSVFGView
std::unique_ptr< SlicedTCT > slicedTCT
std::unique_ptr< MHP > mhp
std::unique_ptr< MHP > slicedMHP
static void reportOriginalStatistics(SVFIR *svfir)
Pipeline utilities shared by the sliced and whole-program paths.
BVDataPTAImpl * getMainPTA() const
std::unique_ptr< FlowSensitive > mainFSMPTA
llvm::IRBuilder IRBuilder
bool operator<(const RaceClassKey &other) const
const NodeBS * interleaving
std::vector< size_t > members
One occurrence of a memory access under one thread instance.
const NodeBS * interleaving
A race pair: two statements that may race.
bool operator<(const RacePair &other) const
RacePair(const SVFStmt *s1, const SVFStmt *s2)
static bool statementLess(const SVFStmt *lhs, const SVFStmt *rhs)