-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
660 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
\section{Abstract Locations and Regions} | ||
\subsection{Abstract Locations and Regions} | ||
\label{sec:abslocs} | ||
|
||
|
||
\subsection{Class AbsRegionConverter} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
\section{Assignments} | ||
\subsection{Assignments} | ||
\label{sec:assign} | ||
\subsection{Class AssignmentConverter} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,185 @@ | ||
\section{Graphs, Nodes, and Edges} | ||
\subsection{Graph} | ||
\definedin{common/h/Graph.h} | ||
\label{sec:graph} | ||
|
||
We provide a generic graph interface, which allows users adding, deleting, | ||
iterating nodes and edges in a graph. Our slicing algorithms are implemented | ||
upon this graph interface, so users can inherit the defined classes for | ||
customization. | ||
|
||
\begin{apient} | ||
typedef boost::shared_ptr<Graph> Graph::Ptr; | ||
\end{apient} | ||
\apidesc{Shared pointer for Graph} | ||
|
||
\begin{apient} | ||
virtual void Graph::entryNodes(NodeIterator &begin, NodeIterator &end); | ||
\end{apient} | ||
\apidesc{The entry nodes (nodes without any incoming edges) of the graph.} | ||
|
||
// If you want to traverse the graph backwards start here. | ||
\begin{apient} | ||
virtual void Graph::exitNodes(NodeIterator &begin, NodeIterator &end); | ||
\end{apient} | ||
\apidesc{The exit nodes (nodes without any outgoing edges) of the graph.} | ||
|
||
\begin{apient} | ||
virtual void Graph::allNodes(NodeIterator &begin, NodeIterator &end); | ||
\end{apient} | ||
\apidesc{Iterate all nodes in the graph.} | ||
|
||
|
||
\begin{apient} | ||
class Graph::NodePredicate; | ||
typedef boost::shared_ptr<Graph::NodePredicate> Graph::NodePredicate::Ptr; | ||
virtual bool Graph::NodePredicate::predicate(const NodePtr &node) = 0; | ||
|
||
\end{apient} | ||
\apidesc{Interface class for predicate-based searches. Users can inherit this | ||
class to specify the functor to use as a predicate to iterate over nodes in the | ||
graph.} | ||
|
||
|
||
\begin{apient} | ||
virtual bool Graph::find(Address addr, NodeIterator &begin, NodeIterator &end); | ||
|
||
typedef bool (*NodePredicateFunc)(const NodePtr &node, void *user_arg); | ||
virtual bool Graph::find(NodePredicate::Ptr, NodeIterator &begin, NodeIterator &end); | ||
|
||
virtual bool Graph::find(NodePredicateFunc, void *user_arg, NodeIterator &begin, NodeIterator &end); | ||
\end{apient} | ||
\apidesc{Find all nodes satisfying the given conditions} | ||
|
||
\begin{apient} | ||
bool Graph::printDOT(const std::string& fileName); | ||
\end{apient} | ||
\apidesc{Output the graph in dot format.} | ||
|
||
\begin{apient} | ||
static Graph::Ptr Graph::createGraph(); | ||
\end{apient} | ||
\apidesc{Return an empty graph.} | ||
|
||
\begin{apient} | ||
void Graph::insertPair(NodePtr source, NodePtr target, EdgePtr edge = EdgePtr()); | ||
\end{apient} | ||
\apidesc{Insert an pair of node into the graph and create a new edge \code{edge} from | ||
\code{source} to \code{target}.} | ||
|
||
\begin{apient} | ||
virtual void Graph::insertEntryNode(NodePtr entry); | ||
virtual void Graph::insertExitNode(NodePtr exit); | ||
\end{apient} | ||
\apidesc{Insert a node as an entry/exit node} | ||
|
||
\begin{apient} | ||
virtual void Graph::markAsEntryNode(NodePtr entry); | ||
virtual void Graph::markAsExitNode(NodePtr exit); | ||
\apidesc{Mark a node that has been added to this graph as an entry/exit node.} | ||
|
||
|
||
\begin{apient} | ||
void Graph::deleteNode(NodePtr node); | ||
void Graph::addNode(NodePtr node); | ||
\end{apient} | ||
\apidesc{Delete / Add a node.} | ||
|
||
\begin{apient} | ||
bool Graph::isEntryNode(NodePtr node); | ||
bool Graph::isExitNode(NodePtr node); | ||
\end{apient} | ||
\apidesc{Check whether a node is an entry / exit node} | ||
|
||
\begin{apient} | ||
void Graph::clearEntryNodes(); | ||
void Graph::clearExitNodes(); | ||
\end{apient} | ||
\apidesc{Clear the marking of entry / exit nodes. Note that the nodes are not | ||
deleted from the graph.} | ||
|
||
\begin{apient} | ||
unsigned Graph::size() const; | ||
\end{apient} | ||
\apidesc{Return the number of nodes in the graph.} | ||
|
||
\subsection{Node} | ||
\definedin{common/h/Node.h} | ||
|
||
\begin{apient} | ||
typedef boost::shared_ptr<Node> Node::Ptr; | ||
\end{apient} | ||
\apidesc{shared pointer for Node} | ||
|
||
\begin{apient} | ||
void Node::ins(EdgeIterator &begin, EdgeIterator &end); | ||
void Node::outs(EdgeIterator &begin, EdgeIterator &end); | ||
\end{apient} | ||
\apidesc{Iterate over incoming/outgoing edges of this node.} | ||
|
||
\begin{apient} | ||
void Node::ins(NodeIterator &begin, NodeIterator &end); | ||
void Node::outs(NodeIterator &begin, NodeIterator &end); | ||
\end{apient} | ||
\apidesc{Iterate over adjacent nodes connected with incoming/outgoing edges of | ||
this node}. | ||
|
||
\begin{apient} | ||
bool Node::hasInEdges(); | ||
bool Node::hasOutEdges(); | ||
\end{apient} | ||
\apidesc{Return \code{true} if this node has incoming/outgoing edges.} | ||
|
||
\begin{apient} | ||
void Node::deleteInEdge(EdgeIterator e); | ||
void Node::deleteOutEdge(EdgeIterator e); | ||
\end{apient} | ||
\apidesc{Delete an incoming/outgoing edge.} | ||
|
||
\begin{apient} | ||
virtual Address Node::addr() const; | ||
\end{apient} | ||
\apidesc{Return the address of this node.} | ||
|
||
\begin{apient} | ||
virtual std::string Node::format() const = 0; | ||
\end{apient} | ||
\apidesc{Return the string representation.} | ||
|
||
\begin{apient} | ||
class NodeIterator | ||
\end{apient} | ||
\apidesc{Iterator for nodes. Common iterator operations including \code{++}, | ||
\code{--}, and dereferencing are supported.} | ||
|
||
|
||
\subsection{Edge} | ||
\definedin{common/h/Edge.h} | ||
|
||
\begin{apient} | ||
typedef boost::shared_ptr<Edge> Edge::Ptr; | ||
\end{apient} | ||
\apidesc{Shared pointer for \code{Edge}.} | ||
|
||
\begin{apient} | ||
static Edge::Ptr Edge::createEdge(const Node::Ptr source, const Node::Ptr target); | ||
\end{apient} | ||
\apidesc{Create a new directed edge from \code{source} to \code{target}.} | ||
|
||
\begin{apient} | ||
Node::Ptr Edge::source() const; | ||
Node::Ptr Edge::target() const; | ||
\end{apient} | ||
\apidesc{Return the source / target node.} | ||
|
||
\begin{apient} | ||
void Edge::setSource(Node::Ptr source); | ||
void Edge::setTarget(Node::Ptr target); | ||
\end{apient} | ||
\apidesc{Set the source / target node.} | ||
|
||
\begin{apient} | ||
class EdgeIterator | ||
\end{apient} | ||
\apidesc{Iterator for edges. Common iterator operations including \code{++}, | ||
\code{--}, and dereferencing are supported.} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
\section{Introduction} | ||
\label{sec:intro} | ||
|
||
DataFlowAPI aggregates a collection of dataflow analysis algorithms that are useful in Dyninst development into a single library. Currently, these algorithms include: | ||
DataFlowAPI aggregates a collection of dataflow analysis algorithms that are | ||
useful in Dyninst development into a single library. These algorithms can also | ||
be a foundation for users to build customized analysis. Currently, these algorithms include: | ||
\begin{itemize} | ||
\item Slicing | ||
\item Stack Analysis | ||
\item Instruction Semantics | ||
\item Symbolic Expansion and Evaluation | ||
\item Register Liveness | ||
\end{itemize} | ||
\end{itemize} |
Oops, something went wrong.