3#ifndef INCLUDE_GRAPHS_SPARSEOBJGRAPH_H_
4#define INCLUDE_GRAPHS_SPARSEOBJGRAPH_H_
77 void dump(
const std::string& file);
An edge carries the source packed Obj to the target ICFG location.
SparseObjEdge(SparseObjNode *source, SparseObjNode *target)
std::string toString() const
const std::vector< const Edge * > & getInputs(const ICFGNode *node) const
Return incoming edges at this ICFG location for client-side value flow.
bool isBranch(const ICFGNode *node) const
SparseObjGraph & operator=(const SparseObjGraph &)=delete
Map< const ICFGNode *, std::vector< const Edge * > > inputs
Node * getOrCreateBaseObjNode(NodeID baseObjId, const ICFGNode *location)
Map< const ICFGNode *, Set< NodeID > > returnedGroups
Map< NodeID, Map< const ICFGNode *, Node * > > groupNodes
Normal nodes are unique by (base, ICFG location); branch nodes by edge.
SparseObjGraph(const SVFG &svfg, ICFG &icfg, PointerAnalysis &pta, const SVFIR &svfir)
Construction uses static graphs and points-to results, not AE state.
void connectFrom(NodeID base, const ICFGNode *source, const Set< const ICFGNode * > &events, Set< const ICFGNode * > &newSources)
Map< const ICFGNode *, Map< const FunObjVar *, Set< NodeID > > > returnedGroupsByCallee
std::string toString() const
Describe the static nodes and edges as text, without AE values.
Map< NodeID, Map< const IntraCFGEdge *, Node * > > branchNodes
void addEdge(NodeID base, const ICFGNode *source, const ICFGNode *target, const IntraCFGEdge *branch)
SparseObjGraph(const SparseObjGraph &)=delete
Node * getBranchNode(NodeID base, const IntraCFGEdge *branch)
void addRouteEdge(Node *source, Node *target)
void dump(const std::string &file)
Write a DOT graph to <file>.dot through GraphPrinter.
const IntraCFGEdge * branch
const ICFGNode * location
std::string toString() const
const ICFGNode * getICFGNode() const
SparseObjNode(NodeID id, NodeID base, const ICFGNode *location, const IntraCFGEdge *branch)
std::unordered_set< Key, Hash, KeyEqual, Allocator > Set
GenericGraph< SparseObjNode, SparseObjEdge > GenericSparseObjGraphTy
GenericNode< SparseObjNode, SparseObjEdge > GenericSparseObjNodeTy
std::unordered_map< Key, Value, Hash, KeyEqual, Allocator > Map
GenericEdge< SparseObjNode > GenericSparseObjEdgeTy