util

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NodePIFromCFG

func NodePIFromCFG(graph *cfg.CFG) ([]int, map[int]dfa.NodePI)

NodePIFromCFG returns the slice of all labels and the label-to-NodePI-interface map of the input CFG

func NodePSFromCFG

func NodePSFromCFG(graph *cfg.CFG) ([]int, map[int]dfa.Node)

NodePSFromCFG returns the slice of all labels and the label-to-NodePS-interface map of the input CFG

func PrettyPrintFlows

func PrettyPrintFlows(graph *cfg.CFG, in, out map[int]Set) string

Types

type NodePI

type NodePI struct {
	// contains filtered or unexported fields
}

NodePI is a concrete implementation of the dfa.NodePI interface, useful for stringlang CFGs

func (*NodePI) Get

func (n *NodePI) Get() dfa.Stmt

func (*NodePI) Label

func (n *NodePI) Label() int

func (*NodePI) Preds

func (n *NodePI) Preds() []int

func (*NodePI) Succs

func (n *NodePI) Succs() []int

type NodePS

type NodePS struct {
	// contains filtered or unexported fields
}

NodePS is a concrete implementation of the path-sensitive dataflowanalysis.Node interface

func (*NodePS) Get

func (n *NodePS) Get() dfa.Stmt

func (*NodePS) Label

func (n *NodePS) Label() int

func (*NodePS) PredsNotTaken

func (n *NodePS) PredsNotTaken() []int

func (*NodePS) PredsTaken

func (n *NodePS) PredsTaken() []int

func (*NodePS) SuccsNotTaken

func (n *NodePS) SuccsNotTaken() []int

func (*NodePS) SuccsTaken

func (n *NodePS) SuccsTaken() []int

type Set

type Set map[string]struct{}

A Set is a dataflowanalysis.Fact compliant lattice of sets (e.g. the lattice of the powerset of all variables)

func EmptySet

func EmptySet() Set

func SetFrom

func SetFrom(els ...string) Set

func (Set) Contains

func (s Set) Contains(v string) bool

func (Set) Equals

func (s Set) Equals(otherF dfa.Fact) bool

func (Set) Except

func (s Set) Except(s2 Set) Set

func (Set) Intersect

func (s Set) Intersect(s2 Set) Set

func (Set) String

func (s Set) String() string

func (Set) Union

func (s Set) Union(s2 Set) Set

Jump to

Keyboard shortcuts

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