30#ifndef INCLUDE_UTIL_CXTSTMT_H_
31#define INCLUDE_UTIL_CXTSTMT_H_
72 return cxt <
rhs.getContext();
100 for(CallStrCxt::const_iterator it =
cxt.begin(),
eit =
cxt.end(); it!=
eit; ++it)
147 return tid <
rhs.getTid();
151 return cxt <
rhs.getContext();
171 return !(*
this==
rhs);
220 return cxt <
rhs.getContext();
240 return !(*
this==
rhs);
248 for(CallStrCxt::const_iterator it =
cxt.begin(),
eit =
cxt.end(); it!=
eit; ++it)
339 return fun <
rhs.getProc();
341 return cxt <
rhs.getContext();
356 return (
fun ==
rhs.getProc() &&
cxt ==
rhs.getContext());
361 return !(*
this ==
rhs);
369 for (CallStrCxt::const_iterator it =
cxt.begin(),
eit =
cxt.end(); it !=
eit; ++it)
419 return tid <
rhs.getTid();
420 else if(
fun!=
rhs.getProc())
421 return fun <
rhs.getProc();
423 return cxt <
rhs.getContext();
444 return !(*
this==
rhs);
462template <>
struct std::hash<
SVF::CxtThread>
466 std::hash<SVF::CallStrCxt> ch;
470 return pairH({forksite, ch(ct.
getContext())});
473template <>
struct std::hash<
SVF::CxtThreadProc>
477 std::hash<SVF::CallStrCxt> ch;
479 return pairH({ctp.
getTid(),
483template <>
struct std::hash<
SVF::CxtStmt>
487 std::hash<SVF::CallStrCxt> ch;
492template <>
struct std::hash<
SVF::CxtThreadStmt>
496 std::hash<SVF::CxtStmt> csH;
498 return pairH({cts.
getTid(), csH(cts)});
501template <>
struct std::hash<
SVF::CxtProc>
505 std::hash<SVF::CallStrCxt> ch;
bool operator!=(const CxtProc &rhs) const
Overloading operator==.
CxtProc & operator=(const CxtProc &rhs)
Overloading operator=.
void dump() const
Dump CxtProc.
CxtProc(const CxtProc &ctm)
Copy constructor.
CxtProc(const CallStrCxt &c, const FunObjVar *f)
Constructor.
const CallStrCxt & getContext() const
Return current context.
bool operator==(const CxtProc &rhs) const
Overloading operator==.
virtual ~CxtProc()
Destructor.
bool operator<(const CxtProc &rhs) const
std::string cxtToStr() const
Return context in string format.
const FunObjVar * getProc() const
Return current procedure.
CxtStmt(const CallStrCxt &c, const ICFGNode *f)
Constructor.
bool operator!=(const CxtStmt &rhs) const
Overloading operator==.
virtual ~CxtStmt()
Destructor.
void dump() const
Dump CxtStmt.
const CallStrCxt & getContext() const
Return current context.
bool operator<(const CxtStmt &rhs) const
std::string cxtToStr() const
Return context in string format.
CxtStmt & operator=(const CxtStmt &rhs)
Overloading operator=.
const ICFGNode * getStmt() const
Return current statement.
CxtStmt(const CxtStmt &ctm)
Copy constructor.
bool operator==(const CxtStmt &rhs) const
Overloading operator==.
CxtThreadProc(NodeID t, const CallStrCxt &c, const FunObjVar *f)
Constructor.
CxtThreadProc & operator=(const CxtThreadProc &rhs)
Overloading operator=.
bool operator<(const CxtThreadProc &rhs) const
NodeID getTid() const
Return current thread id.
bool operator!=(const CxtThreadProc &rhs) const
Overloading operator==.
virtual ~CxtThreadProc()
Destructor.
CxtThreadProc(const CxtThreadProc &ctm)
Copy constructor.
void dump() const
Dump CxtThreadProc.
bool operator==(const CxtThreadProc &rhs) const
Overloading operator==.
CxtThreadStmt(NodeID t, const CallStrCxt &c, const ICFGNode *f)
Constructor.
NodeID getTid() const
Return current context.
CxtThreadStmt & operator=(const CxtThreadStmt &rhs)
Overloading operator=.
void dump() const
Dump CxtThreadStmt.
CxtThreadStmt(const CxtThreadStmt &ctm)
Copy constructor.
bool operator!=(const CxtThreadStmt &rhs) const
Overloading operator==.
virtual ~CxtThreadStmt()
Destructor.
bool operator==(const CxtThreadStmt &rhs) const
Overloading operator==.
bool operator<(const CxtThreadStmt &rhs) const
CxtThread & operator=(const CxtThread &rhs)
Overloading operator=.
const CallStrCxt & getContext() const
Return context of the thread.
virtual ~CxtThread()
Destructor.
bool operator<(const CxtThread &rhs) const
const ICFGNode * getThread() const
Return forksite.
void dump() const
Dump CxtThread.
const ICFGNode * forksite
CxtThread(const CallStrCxt &c, const ICFGNode *fork)
Constructor.
std::string cxtToStr() const
Return context in string format.
void setInloop(bool in)
inloop, incycle attributes
CxtThread(const CxtThread &ct)
Copy constructor.
bool operator!=(const CxtThread &rhs) const
Overloading operator==.
bool operator==(const CxtThread &rhs) const
Overloading operator==.
virtual const std::string toString() const
NodeID getId() const
Get ID.
virtual const std::string & getName() const
std::ostream & outs()
Overwrite llvm::outs()
llvm::IRBuilder IRBuilder
std::vector< u32_t > CallStrCxt
size_t operator()(const SVF::CxtProc &cp) const
size_t operator()(const SVF::CxtStmt &cs) const
size_t operator()(const SVF::CxtThreadProc &ctp) const
size_t operator()(const SVF::CxtThreadStmt &cts) const
size_t operator()(const SVF::CxtThread &ct) const