scalar

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseFlowAnalysis

type BaseFlowAnalysis struct {
	Graph *graph.UnitGraph
}

BaseFlowAnalysis represents a base flow analysis implemention

func NewBase

func NewBase(g *graph.UnitGraph) *BaseFlowAnalysis

NewBase returns a BaseFlowAnalysis

func (*BaseFlowAnalysis) Computations

func (a *BaseFlowAnalysis) Computations() int

Computations limit number of computations on a flow graph

func (*BaseFlowAnalysis) Copy

func (a *BaseFlowAnalysis) Copy(srcMap *map[any]any, dstMap *map[any]any)

Copy copy from srcMap to dstMap

func (*BaseFlowAnalysis) End

func (a *BaseFlowAnalysis) End(universe []*entry.Entry)

End handle result of analysis

func (*BaseFlowAnalysis) EntryInitalFlow

func (a *BaseFlowAnalysis) EntryInitalFlow() *map[any]any

EntryInitalFlow returns a new flow for entry

func (*BaseFlowAnalysis) FlowThrougth

func (a *BaseFlowAnalysis) FlowThrougth(inMap *map[any]any, unit ssa.Instruction, outMap *map[any]any)

FlowThrougth calculate outMap based on inMap and unit

func (*BaseFlowAnalysis) GetGraph

func (a *BaseFlowAnalysis) GetGraph() *graph.UnitGraph

GetGraph returns the Graph memeber in a BaseFlowAnalysis

func (*BaseFlowAnalysis) IsForward

func (a *BaseFlowAnalysis) IsForward() bool

IsForward returns whether this analysis is a forward flow analysis

func (*BaseFlowAnalysis) MergeInto

func (a *BaseFlowAnalysis) MergeInto(unit ssa.Instruction, inout *map[any]any, in *map[any]any)

MergeInto merge from in to inout based on unit

func (*BaseFlowAnalysis) NewInitalFlow

func (a *BaseFlowAnalysis) NewInitalFlow() *map[any]any

NewInitalFlow returns a new flow

type FlowAnalysis

type FlowAnalysis interface {
	GetGraph() *graph.UnitGraph
	IsForward() bool
	Computations() int
	FlowThrougth(inMap *map[any]any, unit ssa.Instruction, outMap *map[any]any)
	NewInitalFlow() *map[any]any
	EntryInitalFlow() *map[any]any
	Copy(srcMap *map[any]any, dstMap *map[any]any)
	MergeInto(Unit ssa.Instruction, inout *map[any]any, in *map[any]any)
	End(universe []*entry.Entry)
}

FlowAnalysis represents a flow analysis

Jump to

Keyboard shortcuts

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