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 ¶
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)
Click to show internal directories.
Click to hide internal directories.