ctrlflow

package
v3.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package ctrlflow represents and constructs control-flow graph (CFG) of MiGo functions in a MiGo program.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Graph

type Graph struct {
	Nodes []*Node
	// contains filtered or unexported fields
}

Graph is a control flow graph.

func NewGraph

func NewGraph(prog *migo.Program) *Graph

NewGraph returns a new CFG given MiGo program prog.

func (*Graph) DotString

func (g *Graph) DotString() string

DotString returns a string representation the graph in dot format.

func (*Graph) String

func (g *Graph) String() string

type Node

type Node struct {
	Preds []*Node
	Succs []*Node
	// contains filtered or unexported fields
}

Node is a CFG node (function) for a migo program.

func (Node) Func

func (n Node) Func() *migo.Function

Func returns the function the Node n represents in the CFG.

func (*Node) String

func (n *Node) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL