fairness

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package fairness runs a fairness analysis.

Fairness analysis is an estimation of loop and recursive calls to find potentially unfair loop and recurse conditions.

  • If the loop is a range slice/map expression --> usually safe (finite)
  • If the loop is a range channel expression --> safe if channel is closed
  • If the loop is an ordinary for-loop --> safe if
  • loop condition is not constant or constant expression
  • loop index is modified [in the loop body]

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(info *ssabuilder.SSAInfo)

Check for fairness on a built SSA

Types

type FairnessAnalysis

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

FairnessAnalysis

func NewFairnessAnalysis

func NewFairnessAnalysis() *FairnessAnalysis

NewFairnessAnalysis starts a new analysis.

func (*FairnessAnalysis) Visit

func (fa *FairnessAnalysis) Visit(fn *ssa.Function)

Jump to

Keyboard shortcuts

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