Versions in this module Expand all Collapse all v1 v1.1.0 Jan 11, 2026 Changes in this version type FingerprintResult + func (r FingerprintResult) GetSSAFunction() *ssa.Function + type Zipper struct + func NewZipper(oldFn, newFn *ssa.Function, policy LiteralPolicy) (*Zipper, error) + func (z *Zipper) ComputeDiff() (*ZipperArtifacts, error) + type ZipperArtifacts struct + Added []string + MatchedNodes int + NewFunction string + OldFunction string + Preserved bool + Removed []string v1.0.0 Jan 11, 2026 Changes in this version + var DefaultLiteralPolicy = LiteralPolicy + var KeepAllLiteralsPolicy = LiteralPolicy + func AnalyzeSCEV(info *LoopInfo) + func BuildSSAFromPackages(initialPkgs []*packages.Package) (*ssa.Program, *ssa.Package, error) + func ReleaseCanonicalizer(c *Canonicalizer) + type Canonicalizer struct + Policy LiteralPolicy + StrictMode bool + func AcquireCanonicalizer(policy LiteralPolicy) *Canonicalizer + func NewCanonicalizer(policy LiteralPolicy) *Canonicalizer + func (c *Canonicalizer) ApplyVirtualControlFlowFromState(swappedBlocks map[*ssa.BasicBlock]bool, ...) + func (c *Canonicalizer) CanonicalizeFunction(fn *ssa.Function) string + type FingerprintResult struct + CanonicalIR string + Filename string + Fingerprint string + FunctionName string + Line int + Pos token.Pos + func FingerprintPackages(initialPkgs []*packages.Package, policy LiteralPolicy, strictMode bool) ([]FingerprintResult, error) + func FingerprintSource(filename string, src string, policy LiteralPolicy) ([]FingerprintResult, error) + func FingerprintSourceAdvanced(filename string, src string, policy LiteralPolicy, strictMode bool) ([]FingerprintResult, error) + func GenerateFingerprint(fn *ssa.Function, policy LiteralPolicy, strictMode bool) FingerprintResult + type IVType int + const IVTypeBasic + const IVTypeDerived + const IVTypeGeometric + const IVTypePolynomial + const IVTypeUnknown + type InductionVariable struct + Phi *ssa.Phi + Start SCEV + Step SCEV + Type IVType + type LiteralPolicy struct + AbstractControlFlowComparisons bool + AbstractOtherTypes bool + KeepReturnStatusValues bool + KeepSmallIntegerIndices bool + KeepStringLiterals bool + SmallIntMax int64 + SmallIntMin int64 + func (p *LiteralPolicy) ShouldAbstract(c *ssa.Const, usageContext ssa.Instruction) bool + type Loop struct + Blocks map[*ssa.BasicBlock]bool + Children []*Loop + Exits []*ssa.BasicBlock + Header *ssa.BasicBlock + Inductions map[*ssa.Phi]*InductionVariable + Latch *ssa.BasicBlock + Parent *Loop + TripCount SCEV + func (l *Loop) String() string + type LoopInfo struct + Function *ssa.Function + LoopMap map[*ssa.BasicBlock]*Loop + Loops []*Loop + func DetectLoops(fn *ssa.Function) *LoopInfo + type Renamer func(ssa.Value) string + type SCEV interface + EvaluateAt func(k *big.Int) *big.Int + IsLoopInvariant func(loop *Loop) bool + String func() string + StringWithRenamer func(r Renamer) string + type SCEVAddRec struct + Loop *Loop + Start SCEV + Step SCEV + func (s *SCEVAddRec) EvaluateAt(k *big.Int) *big.Int + func (s *SCEVAddRec) IsLoopInvariant(loop *Loop) bool + func (s *SCEVAddRec) Name() string + func (s *SCEVAddRec) Parent() *ssa.Function + func (s *SCEVAddRec) Pos() token.Pos + func (s *SCEVAddRec) Referrers() *[]ssa.Instruction + func (s *SCEVAddRec) String() string + func (s *SCEVAddRec) StringWithRenamer(r Renamer) string + func (s *SCEVAddRec) Type() types.Type + type SCEVConstant struct + Value *big.Int + func SCEVFromConst(c *ssa.Const) *SCEVConstant + func (s *SCEVConstant) EvaluateAt(k *big.Int) *big.Int + func (s *SCEVConstant) IsLoopInvariant(loop *Loop) bool + func (s *SCEVConstant) Name() string + func (s *SCEVConstant) Parent() *ssa.Function + func (s *SCEVConstant) Pos() token.Pos + func (s *SCEVConstant) Referrers() *[]ssa.Instruction + func (s *SCEVConstant) String() string + func (s *SCEVConstant) StringWithRenamer(r Renamer) string + func (s *SCEVConstant) Type() types.Type + type SCEVGenericExpr struct + Op token.Token + X SCEV + Y SCEV + func (s *SCEVGenericExpr) EvaluateAt(k *big.Int) *big.Int + func (s *SCEVGenericExpr) IsLoopInvariant(loop *Loop) bool + func (s *SCEVGenericExpr) Name() string + func (s *SCEVGenericExpr) Parent() *ssa.Function + func (s *SCEVGenericExpr) Pos() token.Pos + func (s *SCEVGenericExpr) Referrers() *[]ssa.Instruction + func (s *SCEVGenericExpr) String() string + func (s *SCEVGenericExpr) StringWithRenamer(r Renamer) string + func (s *SCEVGenericExpr) Type() types.Type + type SCEVUnknown struct + IsInvariant bool + Value ssa.Value + func (s *SCEVUnknown) EvaluateAt(k *big.Int) *big.Int + func (s *SCEVUnknown) IsLoopInvariant(loop *Loop) bool + func (s *SCEVUnknown) Name() string + func (s *SCEVUnknown) Parent() *ssa.Function + func (s *SCEVUnknown) Pos() token.Pos + func (s *SCEVUnknown) Referrers() *[]ssa.Instruction + func (s *SCEVUnknown) String() string + func (s *SCEVUnknown) StringWithRenamer(r Renamer) string + func (s *SCEVUnknown) Type() types.Type Other modules containing this package github.com/BlackVectorOps/semantic_firewall/v2