Documentation
¶
Overview ¶
Package cfg offers a comprehensive toolkit for constructing and visualizing control flow graphs (CFGs) of Solidity smart contracts.
Key Features: - Initialization of CFG builders with context and solgo IR builders. - Seamless integration with the go-graphviz library for graph operations. - Recursive traversal of the IR to build nodes and edges for the CFG. - Capability to render the CFG into various formats including DOT and PNG. - Error handling and resource management for efficient graph operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is responsible for constructing the control flow graph.
func NewBuilder ¶
NewBuilder initializes a new CFG builder.
func (*Builder) GenerateDOT ¶
GenerateDOT produces the DOT representation of the given graph.
func (*Builder) GetGraphviz ¶
func (b *Builder) GetGraphviz() *graphviz.Graphviz
GetGraphviz returns the underlying Graphviz instance.