Documentation ¶
Index ¶
- Constants
- Variables
- type Distiller
- type DistillerMetadata
- func (d *DistillerMetadata) BuildDependency(seed *domain.Seed, distilledProg *prog.Prog)
- func (d *DistillerMetadata) Contributes(seed *domain.Seed, seenIps map[uint64]bool) int
- func (d *DistillerMetadata) GetAllDownstreamDependents(seed *domain.Seed, seen map[int]bool) []*prog.Call
- func (d *DistillerMetadata) GetAllUpstreamDependents(seed *domain.Seed, seen map[int]bool) []*prog.Call
- func (d *DistillerMetadata) Stats(distilledSeeds domain.Seeds)
- func (d *DistillerMetadata) TrackDependencies(prg *prog.Prog)
- type ImplicitDistiller
- func (d *ImplicitDistiller) Add(seeds domain.Seeds)
- func (d *ImplicitDistiller) AddImplicitDependencies(calls []*prog.Call, seed *domain.Seed, seenMap map[int]bool) []*prog.Call
- func (d *ImplicitDistiller) AddToDistilledProg(seed *domain.Seed)
- func (d *ImplicitDistiller) Distill(progs []*prog.Prog) (distilled []*prog.Prog)
- type RandomDistiller
- type StrongDistiller
- type Trace
- type TraceDistiller
- type Traces
- type WeakDistiller
- func (d *WeakDistiller) Add(seeds domain.Seeds)
- func (d *WeakDistiller) AddToDistilledProg(seed *domain.Seed)
- func (d *WeakDistiller) Distill(progs []*prog.Prog) (distilled []*prog.Prog)
- func (d *WeakDistiller) GetDependents(seedCalls []*prog.Call) []*prog.Call
- func (d *WeakDistiller) GetNeighbors(seed *domain.Seed) []*prog.Call
Constants ¶
View Source
const NumCallsLTPKself = 12712
Number of calls generated by distilling LTP + Kself
View Source
const NumCallsLTPKselfPosix = 15333
Number of calls generated by distilling LTP + Kself + Posix
View Source
const NumCallsLTPKselfPosixGlibc = 16442
Number of calls generated by distilling LTP + Kself + Posix + Glibc
Variables ¶
View Source
var (
RADIUS int = 2
)
Functions ¶
This section is empty.
Types ¶
type Distiller ¶
type Distiller interface { Distill([]*prog.Prog) []*prog.Prog Add(domain.Seeds) Stats(domain.Seeds) }
func NewDistiller ¶
func NewDistiller(conf config.DistillConfig) (d Distiller)
type DistillerMetadata ¶
type DistillerMetadata struct { StatFile string Seeds domain.Seeds DistilledProgs []*prog.Prog CallToSeed map[*prog.Call]*domain.Seed CallToDistilledProg map[*prog.Call]*prog.Prog CallToIdx map[*prog.Call]int UpstreamDependencyGraph map[*domain.Seed]map[int]map[prog.Arg][]prog.Arg DownstreamDependents map[*domain.Seed]map[int]bool }
func (*DistillerMetadata) BuildDependency ¶
func (d *DistillerMetadata) BuildDependency(seed *domain.Seed, distilledProg *prog.Prog)
func (*DistillerMetadata) Contributes ¶
func (*DistillerMetadata) GetAllDownstreamDependents ¶
func (*DistillerMetadata) GetAllUpstreamDependents ¶
func (*DistillerMetadata) Stats ¶
func (d *DistillerMetadata) Stats(distilledSeeds domain.Seeds)
func (*DistillerMetadata) TrackDependencies ¶
func (d *DistillerMetadata) TrackDependencies(prg *prog.Prog)
type ImplicitDistiller ¶
type ImplicitDistiller struct { *DistillerMetadata // contains filtered or unexported fields }
func NewImplicitDistiller ¶
func NewImplicitDistiller(conf config.DistillConfig) (d *ImplicitDistiller)
func (*ImplicitDistiller) Add ¶
func (d *ImplicitDistiller) Add(seeds domain.Seeds)
func (*ImplicitDistiller) AddImplicitDependencies ¶
func (*ImplicitDistiller) AddToDistilledProg ¶
func (d *ImplicitDistiller) AddToDistilledProg(seed *domain.Seed)
type RandomDistiller ¶
type RandomDistiller struct {
*DistillerMetadata
}
func NewRandomDistiller ¶
func NewRandomDistiller(conf config.DistillConfig) (d *RandomDistiller)
func (*RandomDistiller) Add ¶
func (d *RandomDistiller) Add(seeds domain.Seeds)
func (*RandomDistiller) Distill ¶
func (d *RandomDistiller) Distill(progs []*prog.Prog) (distilled []*prog.Prog)
func (*RandomDistiller) StripDependencies ¶
func (d *RandomDistiller) StripDependencies(distilledProgs []*prog.Prog) []*prog.Prog
type StrongDistiller ¶
type StrongDistiller struct {
*DistillerMetadata
}
func NewStrongDistiller ¶
func NewStrongDistiller(conf config.DistillConfig) (d *StrongDistiller)
func (*StrongDistiller) Add ¶
func (d *StrongDistiller) Add(seeds domain.Seeds)
func (*StrongDistiller) AddToDistilledProg ¶
func (d *StrongDistiller) AddToDistilledProg(seed *domain.Seed)
type TraceDistiller ¶
type TraceDistiller struct {
*DistillerMetadata
}
func NewTraceDistiller ¶
func NewTraceDistiller(conf config.DistillConfig) (d *TraceDistiller)
func (*TraceDistiller) Add ¶
func (d *TraceDistiller) Add(seeds domain.Seeds)
func (*TraceDistiller) Contributes ¶
func (d *TraceDistiller) Contributes(trace *Trace, seenIps map[uint64]bool) int
type WeakDistiller ¶
type WeakDistiller struct {
*DistillerMetadata
}
func NewWeakDistiller ¶
func NewWeakDistiller(conf config.DistillConfig) (d *WeakDistiller)
func (*WeakDistiller) Add ¶
func (d *WeakDistiller) Add(seeds domain.Seeds)
func (*WeakDistiller) AddToDistilledProg ¶
func (d *WeakDistiller) AddToDistilledProg(seed *domain.Seed)
func (*WeakDistiller) Distill ¶
func (d *WeakDistiller) Distill(progs []*prog.Prog) (distilled []*prog.Prog)
func (*WeakDistiller) GetDependents ¶
func (d *WeakDistiller) GetDependents(seedCalls []*prog.Call) []*prog.Call
This is the core of the weak distiller. We start with the centroid and get all downstream dependents. Every call needs its upstream dependents to run correctly so we get those. We then pull all downstream dependents of those upstreams and if there are any new calls, we pull the upstream of them. We can keep going, but this is a heuristic
func (*WeakDistiller) GetNeighbors ¶
func (d *WeakDistiller) GetNeighbors(seed *domain.Seed) []*prog.Call
Click to show internal directories.
Click to hide internal directories.