Documentation
¶
Index ¶
- Constants
- type AlgorithmContext
- type RunContext
- func (ctx *RunContext) BestResult() *candidate.CandidateWithSize
- func (ctx *RunContext) CountTokens(bytes []byte) int
- func (ctx *RunContext) CurrentSemanticStrategy() int
- func (ctx *RunContext) ExhaustedSemanticStrategies() bool
- func (ctx *RunContext) GetHash() [16]byte
- func (ctx *RunContext) GetStrategyName(index int) string
- func (ctx *RunContext) IncrementSemanticStrategy()
- func (ctx *RunContext) InputFilename() string
- func (ctx *RunContext) Language() string
- func (ctx *RunContext) ReductionDir() string
- func (ctx *RunContext) SemanticApplicationMethod() SemanticApplicationMethod
- func (ctx *RunContext) SemanticReduce(bytes []byte) ([][]byte, error)
- func (ctx *RunContext) SemanticReduceWithStrategy(bytes []byte, strategyIndex int) ([][]byte, error)
- func (ctx *RunContext) SemanticStrategiesTotal() int
- func (ctx *RunContext) SetExhaustedSemanticStrategies()
- func (ctx *RunContext) Sizes() SizeContext
- func (ctx *RunContext) SyntacticReducer() syntactic.Functions
- func (ctx *RunContext) TestFilename() string
- func (ctx *RunContext) UpdateCurrent(candidatePath string, candidateSize int) error
- type RunContextErr
- type SemanticApplicationMethod
- type SizeContext
Constants ¶
View Source
const RunContextFolderPrefix = "seru_reduction_"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlgorithmContext ¶
type AlgorithmContext struct {
// contains filtered or unexported fields
}
func NewAlgorithmContext ¶
func NewAlgorithmContext(useIsolation bool) *AlgorithmContext
type RunContext ¶
type RunContext struct {
// contains filtered or unexported fields
}
RunContext holds all data necessary for reduction TODO add metrics like test script count
func NewRunContext ¶
func NewRunContext(givenLanguage, inputFilePath, testScriptPath string, algoContext AlgorithmContext) (*RunContext, error)
func (*RunContext) BestResult ¶
func (ctx *RunContext) BestResult() *candidate.CandidateWithSize
func (*RunContext) CountTokens ¶
func (ctx *RunContext) CountTokens(bytes []byte) int
func (*RunContext) CurrentSemanticStrategy ¶
func (ctx *RunContext) CurrentSemanticStrategy() int
func (*RunContext) ExhaustedSemanticStrategies ¶
func (ctx *RunContext) ExhaustedSemanticStrategies() bool
func (*RunContext) GetHash ¶
func (ctx *RunContext) GetHash() [16]byte
func (*RunContext) GetStrategyName ¶
func (ctx *RunContext) GetStrategyName(index int) string
func (*RunContext) IncrementSemanticStrategy ¶
func (ctx *RunContext) IncrementSemanticStrategy()
func (*RunContext) InputFilename ¶
func (ctx *RunContext) InputFilename() string
func (*RunContext) Language ¶
func (ctx *RunContext) Language() string
func (*RunContext) ReductionDir ¶
func (ctx *RunContext) ReductionDir() string
func (*RunContext) SemanticApplicationMethod ¶
func (ctx *RunContext) SemanticApplicationMethod() SemanticApplicationMethod
func (*RunContext) SemanticReduce ¶
func (ctx *RunContext) SemanticReduce(bytes []byte) ([][]byte, error)
func (*RunContext) SemanticReduceWithStrategy ¶
func (ctx *RunContext) SemanticReduceWithStrategy(bytes []byte, strategyIndex int) ([][]byte, error)
func (*RunContext) SemanticStrategiesTotal ¶
func (ctx *RunContext) SemanticStrategiesTotal() int
func (*RunContext) SetExhaustedSemanticStrategies ¶
func (ctx *RunContext) SetExhaustedSemanticStrategies()
func (*RunContext) Sizes ¶
func (ctx *RunContext) Sizes() SizeContext
func (*RunContext) SyntacticReducer ¶
func (ctx *RunContext) SyntacticReducer() syntactic.Functions
func (*RunContext) TestFilename ¶
func (ctx *RunContext) TestFilename() string
func (*RunContext) UpdateCurrent ¶
func (ctx *RunContext) UpdateCurrent(candidatePath string, candidateSize int) error
type RunContextErr ¶
type RunContextErr struct {
// contains filtered or unexported fields
}
func NewRunContextErr ¶
func NewRunContextErr(err error) *RunContextErr
func (*RunContextErr) Error ¶
func (e *RunContextErr) Error() string
type SemanticApplicationMethod ¶
type SemanticApplicationMethod string
const ( ApplyFirstOnly SemanticApplicationMethod = "ApplyFirstOnly" ApplyAllCombined SemanticApplicationMethod = "ApplyAllCombined" )
type SizeContext ¶
func (SizeContext) AsPercent ¶
func (s SizeContext) AsPercent() string
Click to show internal directories.
Click to hide internal directories.