defs

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VK = struct {
	ALLOC vk
	PTR   vk
	CH    vk
}{
	ALLOC: 0,
	PTR:   1,
	CH:    2,
}

Functions

func Create

func Create() factory

func EmptyIntraprocessWorklist

func EmptyIntraprocessWorklist(prios u.CtrLocPriorities) pq.PriorityQueue[CtrLoc]

A worklist that contains control locations. It orders elements of the list according to the ordering described in InitializeCtrLocPriorities. The list also uses a map of the contained elements to prevent duplicates.

func NewControllocationMap

func NewControllocationMap() *immutable.Map

func NewGoroutineMap

func NewGoroutineMap() *immutable.Map

func NewSuperlocationMap

func NewSuperlocationMap() *immutable.Map

Types

type CtrLoc

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

NOTE: This struct is used as a map key in abs-config. It is therefore important that it can be correctly compared with ==.

func (CtrLoc) CallRelationNode

func (cl CtrLoc) CallRelationNode() CtrLoc

Derive control location from the call relation node of the given node.

func (CtrLoc) Context

func (cl CtrLoc) Context() ctrlocContext

func (CtrLoc) Derive

func (cl CtrLoc) Derive(n cfg.Node) CtrLoc

Derive new control location from current one with given control flow node.

func (CtrLoc) DeriveBatch

func (cl CtrLoc) DeriveBatch(mp map[cfg.Node]struct{}) map[CtrLoc]bool

Derive a batch of control locations from the provided set of control flow nodes.

func (CtrLoc) Equal

func (c1 CtrLoc) Equal(c2 CtrLoc) bool

func (CtrLoc) Exiting

func (cl CtrLoc) Exiting() bool

func (CtrLoc) Forking

func (cl CtrLoc) Forking() bool

A control location is forking if it has more than one successor or predecessor.

func (CtrLoc) Hash

func (cl CtrLoc) Hash() uint32

func (CtrLoc) Node

func (cl CtrLoc) Node() cfg.Node

func (CtrLoc) Panic

func (cl CtrLoc) Panic() CtrLoc

Derive the panic continuation from control flow defer link, or from the given panic continuation.

func (CtrLoc) Panicked

func (cl CtrLoc) Panicked() bool

func (CtrLoc) PosString

func (cl CtrLoc) PosString() string

func (CtrLoc) Predecessor

func (cl CtrLoc) Predecessor() CtrLoc

Derive control location predecessor from control flow node predecessor Will panic if there is more than one predecessor.

func (CtrLoc) Root

func (cl CtrLoc) Root() *ssa.Function

func (CtrLoc) String

func (cl CtrLoc) String() string

func (CtrLoc) Successor

func (cl CtrLoc) Successor() CtrLoc

Derive control location successor from control flow node successor. Will panic if there is more than one successor.

func (CtrLoc) Successors

func (cl CtrLoc) Successors() map[CtrLoc]struct{}

Derive control location successors through control flow node.

func (CtrLoc) WithExiting

func (cl CtrLoc) WithExiting(exiting bool) CtrLoc

type Goro

type Goro interface {
	Hash() uint32
	Equal(Goro) bool
	// Like equal but disregards indexes
	WeakEqual(Goro) bool

	String() string
	// Goroutines use control locations as part of their identification.
	CtrLoc() CtrLoc
	Index() int
	Parent() Goro
	Root() Goro
	// Spawns a goroutine off the current goroutine at the provided control location
	Spawn(CtrLoc) Goro
	// Spawns an indexed goroutine off the current goroutine at the provided control location.
	SpawnIndexed(CtrLoc, int) Goro
	// Sets the index
	SetIndex(int) Goro
	IsRoot() bool

	IsChildOf(Goro) bool
	IsParentOf(Goro) bool

	// Returns true if the control location spawn point chain has a cycle.
	IsCircular() bool
	// Get the parent goroutine with the longest chain of non-repeating control
	// location spawning points.
	GetRadix() Goro
	// Returns the length of the go-string.
	Length() int
}

type Superloc

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

func (Superloc) Derive

func (s Superloc) Derive(threads map[Goro]CtrLoc) Superloc

func (Superloc) DeriveThread

func (s Superloc) DeriveThread(g Goro, cl CtrLoc) Superloc

func (Superloc) Equal

func (s1 Superloc) Equal(s2 Superloc) bool

func (Superloc) Find

func (s Superloc) Find(find func(Goro, CtrLoc) bool) (Goro, CtrLoc, bool)

func (Superloc) FindAll

func (s Superloc) FindAll(find func(Goro, CtrLoc) bool) map[Goro]CtrLoc

func (Superloc) ForEach

func (s Superloc) ForEach(do func(Goro, CtrLoc))

func (Superloc) Get

func (s Superloc) Get(tid Goro) (CtrLoc, bool)

func (Superloc) GetUnsafe

func (s Superloc) GetUnsafe(g Goro) CtrLoc

func (Superloc) Hash

func (s Superloc) Hash() uint32

func (Superloc) Main

func (s Superloc) Main() Goro

Method for retrieving the main goroutine (identified as the root goroutine).

func (Superloc) NextIndex

func (s Superloc) NextIndex(g1 Goro) int

Returns the next available index for goroutines.

func (Superloc) Root

func (s Superloc) Root() Goro

func (Superloc) Size

func (s Superloc) Size() int

func (Superloc) String

func (s Superloc) String() string

func (Superloc) StringWithPos

func (s Superloc) StringWithPos() string

func (Superloc) Threads

func (s Superloc) Threads() *immutable.Map

func (*Superloc) UpdatePathCondition

func (s *Superloc) UpdatePathCondition(pc pathCondition) *Superloc

func (*Superloc) UpdateThread

func (s *Superloc) UpdateThread(tid Goro, loc CtrLoc) *Superloc

Jump to

Keyboard shortcuts

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