Package it.unive.lisa.outputs
Class DotCFG
- java.lang.Object
-
- it.unive.lisa.outputs.DotGraph<Statement,Edge,CFG>
-
- it.unive.lisa.outputs.DotCFG
-
public final class DotCFG extends DotGraph<Statement,Edge,CFG>
AnDotGraphbuilt from aCFG. Instances of this class can be created throughfromCFG(CFG, String, Function), or read from a file throughDotGraph.readDot(Reader).
-
-
Field Summary
-
Fields inherited from class it.unive.lisa.outputs.DotGraph
COLOR, COLOR_BLACK, COLOR_BLUE, COLOR_GRAY, COLOR_RED, CONDITIONAL_EDGE_STYLE, EXIT_NODE_EXTRA_ATTR, EXIT_NODE_EXTRA_VALUE, LABEL, NODE_SHAPE, NORMAL_NODE_COLOR, SHAPE, SPECIAL_NODE_COLOR, STYLE
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DotCFGfromCFG(CFG source, java.lang.String title, java.util.function.Function<Statement,java.lang.String> labelGenerator)
-
-
-
Method Detail
-
fromCFG
public static DotCFG fromCFG(CFG source, java.lang.String title, java.util.function.Function<Statement,java.lang.String> labelGenerator)
Builds aDotCFGfrom aCFG. The label of a node representing a statementnodewill be composed by joiningnode.toString()(Statement.toString()) withlabelGenerator.apply(node)(Function.apply(Object)) through a new line.- Parameters:
source- the source to export into dot formattitle- the title of the graph, if anylabelGenerator- the function used to generate extra labels- Returns:
- the exported graph built starting from the source
-
-