ptr

package
v0.3.5-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoPointerAnalysis

func DoPointerAnalysis(c *config.Config, p *ssa.Program,
	functionFilter func(*ssa.Function) bool,
	functionSet map[*ssa.Function]bool) (*pointer.Result, error)

DoPointerAnalysis runs the pointer analysis on the program p, marking every Value in the functions filtered by functionFilter as potential Value to query for aliasing.

- p is the program to be analyzed

- functionFilter determines whether to add the values of the function in the Queries or IndirectQueries of the result

- functionSet is the set of functions that will be queried.

If error != nil, the *pointer.Result is such that every Value in the functions f such that functionFilter(f) is true will be in the Queries or IndirectQueries of the pointer.Result

func NewState

func NewState(w *loadprogram.State) result.Result[State]

NewState returns a pointer state that extends the whole program state passed as argument with pointer analysis information.

Types

type State

type State struct {
	*loadprogram.State

	// The pointer analysis result
	PointerAnalysis *pointer.Result
	// contains filtered or unexported fields
}

State extends the WholeProgramState with the pointer analysis information.

func (*State) ReachableFunctions

func (s *State) ReachableFunctions() map[*ssa.Function]bool

ReachableFunctions returns the set of reachable functions from main and init according to the pointer analysis callgraph.

Jump to

Keyboard shortcuts

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