context

package
v0.0.1-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const RunContextFolderPrefix = "seru_reduction_"

Variables

This section is empty.

Functions

This section is empty.

Types

type RunContext

type RunContext struct {
	Language                string
	Current                 *domain.Candidate
	ReductionDir            string
	Sizes                   SizeContext
	SyntacticReducer        syntactic.Functions
	CountTokens             plugin.TokenCountFunction
	SemanticReducer         plugin.SemanticReductionFunction
	CurrentSemanticStrategy int
	SemanticStrategiesTotal int
	// contains filtered or unexported fields
}

TODO add metrics like test script count

func NewRunContext

func NewRunContext(givenLanguage, inputFilePath, testScriptPath string) (*RunContext, error)

func (*RunContext) InputFilename

func (ctx *RunContext) InputFilename() string

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 SizeContext

type SizeContext struct {
	StartSizeInTokens int
	BestSizeInTokens  int
}

func (SizeContext) AsPercent

func (s SizeContext) AsPercent() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL