flow

package
v0.0.0-...-796d0f2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2015 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package flow provides access to control flow graph computation and analysis for Go programs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Computation

type Computation interface {
	Init(ast.Node)
	Transfer(ast.Node)
	Join(ast.Node, ast.Node) bool
}

type Graph

type Graph struct {
	FileSet *token.FileSet
	Start   ast.Node
	End     ast.Node
	Follow  map[ast.Node][]ast.Node
}

func Build

func Build(fset *token.FileSet, body *ast.BlockStmt, interesting func(ast.Node) bool) *Graph

Build constructs a control flow graph, filtered to include only interesting nodes.

func (*Graph) Dataflow

func (g *Graph) Dataflow(compute Computation)

func (*Graph) Dot

func (g *Graph) Dot(edge func(src, dst ast.Node) string) []byte

Jump to

Keyboard shortcuts

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