Documentation ¶
Index ¶
- type Config
- type Congo
- func (c *Congo) DumpRunnerAST(dest io.Writer) error
- func (c *Congo) DumpSSA(dest io.Writer) error
- func (c *Congo) Execute(funcName string) (*ExecuteResult, error)
- func (c *Congo) Funcs() []string
- func (c *Congo) Run(funcName string, values []interface{}) (*interp.CongoInterpResult, error)
- func (c *Congo) Target(name string) *Target
- type ExecuteOption
- type ExecuteResult
- type Program
- type RunResult
- type Target
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // FuncNames is a list of functions that we generate tests for. FuncNames []string // Runner is the path to the Go file that calls the target function. // Automatically generated if empty string is specified. Runner string ExecuteOption }
Config specifies the (optional) parameters for concolic execution. Options are ignored when a field has the zero value.
type Congo ¶
type Congo struct {
// contains filtered or unexported fields
}
Congo is a type that contains the program and dict of targets (keys are names of target function).
func Load ¶
Load loads the target program. targetPackagePath is either - a file path (e.g., foo/bar.go) to the target package - an import path (e.g, github.com/ajalab/congo).
func (*Congo) DumpRunnerAST ¶
DumpRunnerAST dumps the runner AST file into dest.
func (*Congo) Execute ¶
func (c *Congo) Execute(funcName string) (*ExecuteResult, error)
Execute executes concolic execution. The iteration time is bounded by maxExec and stopped when minCoverage is accomplished.
func (*Congo) Funcs ¶
Funcs returns the list of function names that Congo loaded as execution target.
type ExecuteOption ¶
ExecuteOption is a type that contains options to perform concolic execution on a target function.
func (*ExecuteOption) Fill ¶
func (eo *ExecuteOption) Fill(src *ExecuteOption, overwrite bool) *ExecuteOption
Fill fills the fields in ExecuteOption with those in src.
type ExecuteResult ¶
type ExecuteResult struct { Coverage float64 // achieved coverage. SymbolTypes []types.Type RunResults []*RunResult // contains filtered or unexported fields }
ExecuteResult is a type that contains the result of Execute. TODO(ajalab): ReturnValues has type []interp.value so it is meaningless to make this property public. We use reflection to extract values from interp.value for now.
func (*ExecuteResult) GenerateTest ¶
func (r *ExecuteResult) GenerateTest() (*ast.File, error)
GenerateTest generates test module for the program.
type Program ¶
type Program struct {
// contains filtered or unexported fields
}
Program is a type that contains information of the target program.
type RunResult ¶
type RunResult struct {
// contains filtered or unexported fields
}
RunResult is a type that contains the result of Run.
type Target ¶
type Target struct { *ExecuteOption // contains filtered or unexported fields }
Target is a type that contains the single target of concolic testing (function and set of symbols).