1 #ifndef Rose_BinaryAnalysis_Unparser_EdgeArrows_H
2 #define Rose_BinaryAnalysis_Unparser_EdgeArrows_H
4 #include <featureTests.h>
5 #ifdef ROSE_ENABLE_BINARY_ANALYSIS
7 #include <Partitioner2/BasicTypes.h>
8 #include <Sawyer/Graph.h>
9 #include <Sawyer/Interval.h>
10 #include <Sawyer/IntervalMap.h>
11 #include <Sawyer/Map.h>
12 #include <StringUtility.h>
87 OutputLocation location;
93 Arrow(
const OutputLocation &location,
bool isForward)
94 : location(location), isForward(isForward) {}
96 bool operator==(
const Arrow &other) {
97 return location == other.location && isForward == other.isForward;
105 typedef std::vector<Column> Columns;
108 OutputLocation outputHull_;
109 VertexLocations vertexLocations_;
111 ArrowStyle arrowStyle_;
127 void computeLayout(
const Graph&,
const std::vector<VertexId> &order = std::vector<VertexId>());
232 void debug(std::ostream&)
const;
236 void appendVertex(VertexId);
239 static bool ascendingLength(
const Arrow &a,
const Arrow &b);
ArrowSide
On which side of the listing do the errors appear.
void reset()
Reset the analysis.
std::string downToTarget
Text for an arrow comming from above into a vertex.
std::string verticalLine
Text for the vertical line part of an arrow.
size_t nArrowColumns() const
Number of arrow columns.
static ArrowStyle unicodeL2()
Arrow rendering styles.
An associative container whose keys are non-overlapping intervals.
Graph containing user-defined vertices and edges.
std::string sourceThenUp
Text for an arrow leaving a vertex and turning upward.
size_t nSources(VertexId) const
Number of arrows that emanate from the given vertex.
std::string blank
Text when there's lack of any arrow.
Two-character Unicode arrows.
Lines in the middle of a printed vertex.
First line of a vertex when printed.
static ArrowStyle asciiR2()
Arrow rendering styles.
Single-character ASCII-art arrows.
std::string targetHorizontal
Text for the horizontal target of an arrow.
static ArrowStyle unicodeL1()
Arrow rendering styles.
Sawyer::Container::Graph< VertexId, Sawyer::Nothing, VertexId > Graph
Graph relating vertices by their edges with vertex index.
std::string sourceThenDown
Text for an arrow leaving a vertex and turning downward.
rose_addr_t VertexId
Vertex identification numbers.
Main namespace for the ROSE library.
std::string upToTarget
Text for an arrow comming from below into a vertex.
Threee-character ASCII-art arrows.
Single-character Unicode arrows.
Arrows appear right of the listing and point to the left.
Sawyer::SharedPointer< Function > FunctionPtr
Shared-ownership pointer for function.
static VertexId cfgEdgeSourceEndpoint(size_t edgeId)
Endpoint ID for CFG edge arrows.
static ArrowStyle asciiL3()
Arrow rendering styles.
size_t nTargets(VertexId) const
Number of arrows that point to the given vertex.
static ArrowStyle unicodeR2()
Arrow rendering styles.
static ArrowStyle asciiR4()
Arrow rendering styles.
static ArrowStyle asciiL4()
Arrow rendering styles.
std::string renderBlank() const
Render a field of blank characters for all the columns.
std::string render(VertexId, OutputPart) const
Render arrow columsn for a vertex.
void debug(std::ostream &) const
Print implementation-defined debugging information.
std::string sourceHorizontal
Text for the horizontal source of an arrow.
static ArrowStyle asciiL1()
Arrow rendering styles.
ArrowStylePreset
Arrow style presets.
size_t charactersPerColumn
Number of characters per arrow column.
bool pointsRight
Arrows point right? Otherwise left.
Two-character ASCII-art arrows.
static ArrowStyle asciiR3()
Arrow rendering styles.
Analysis to generate arrows from one basic block to another.
static ArrowStyle unicodeR1()
Arrow rendering styles.
Arrows appear left of the listing and point to the right.
Last line of a vertex when printed.
void computeCfgEdgeLayout(const Partitioner2::Partitioner &, const Partitioner2::FunctionPtr &)
Compute arrow layout for a control flow graph for a function.
void computeCfgBlockLayout(const Partitioner2::Partitioner &, const Partitioner2::FunctionPtr &)
Compute arrow layout for a control flow graph for a function.
static ArrowStyle asciiL2()
Arrow rendering styles.
static VertexId cfgEdgeTargetEndpoint(size_t edgeId)
Endpoint ID for CFG edge arrows.
static ArrowStyle asciiR1()
Arrow rendering styles.
void arrowStyle(const ArrowStyle &t)
Property: Information about how to render an arrow.
OutputPart
Parts of the output.
Lines output between vertices.
void computeLayout(const Graph &, const std::vector< VertexId > &order=std::vector< VertexId >())
Analyze connectivity in order to assign arrow locations.
const ArrowStyle & arrowStyle() const
Property: Information about how to render an arrow.